diff options
author | infirit <[email protected]> | 2015-07-09 12:08:18 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-07-09 12:15:32 +0200 |
commit | 72dd61aa3a3a98bf38c2cc3aa7e36f99b620be24 (patch) | |
tree | 4e76ed8e327a98bb4a89876a5747b1ea375fda07 /savers/floaters.c | |
parent | a3c426e1e81dc56f4fdd56f8c736125798fec26b (diff) | |
download | mate-screensaver-72dd61aa3a3a98bf38c2cc3aa7e36f99b620be24.tar.bz2 mate-screensaver-72dd61aa3a3a98bf38c2cc3aa7e36f99b620be24.tar.xz |
Use accessor functions instead of direct access
Make Gtk2 build with GSEAL_ENABLE And cut down on ifdef hell.
Diffstat (limited to 'savers/floaters.c')
-rw-r--r-- | savers/floaters.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/savers/floaters.c b/savers/floaters.c index b693ed5..c2f4bc4 100644 --- a/savers/floaters.c +++ b/savers/floaters.c @@ -41,10 +41,6 @@ #include "gs-theme-window.h" -#if GTK_CHECK_VERSION (3, 0, 0) -#define GTK_WIDGET_REALIZED gtk_widget_get_realized -#endif - #ifndef trunc #define trunc(x) (((x) > 0.0) ? floor((x)) : -floor(-(x))) #endif @@ -1042,7 +1038,7 @@ screen_saver_on_expose_event (ScreenSaver *screen_saver, screen_saver_create_floaters (screen_saver); #if !GTK_CHECK_VERSION (3, 0, 0) - context = gdk_cairo_create (screen_saver->drawing_area->window); + context = gdk_cairo_create (gtk_widget_get_window (screen_saver->drawing_area)); cairo_rectangle (context, (double) event->area.x, @@ -1107,7 +1103,7 @@ screen_saver_update_state (ScreenSaver *screen_saver, screen_saver_floater_update_state (screen_saver, floater, time); - if (GTK_WIDGET_REALIZED (screen_saver->drawing_area) + if (gtk_widget_get_realized (screen_saver->drawing_area) && (floater->bounds.width > 0) && (floater->bounds.height > 0)) { gint size; @@ -1282,7 +1278,7 @@ main (int argc, gtk_widget_override_background_color (drawing_area, 0, &bg); gtk_widget_override_color (drawing_area, 0, &fg); #else - style = drawing_area->style; + style = gtk_widget_get_style (drawing_area); state = (GtkStateType) 0; while (state < (GtkStateType) G_N_ELEMENTS (style->bg)) { |