[gnome-screensaver] =?UTF-8?q?Compile=20with=20GSeal.=20Bumps=20GTK+=20requirement=20to=202.19.7.=20Fixes=20bug=20#61255



commit eeec18d366df1d5f27b4de50e64c4b6ef3000d0c
Author: Andre Klapper <a9016009 gmx de>
Date:   Wed Jun 23 11:47:47 2010 +0200

    =?UTF-8?q?Compile=20with=20GSeal.=20Bumps=20GTK+=20requirement=20to=202.19.7.=20Fixes=20bug=20#612551.
    
    =20Based=20on=20a=20patch=20by=20St=C3=A9phane=20Maniaci.?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit

 configure.ac                        |    2 +-
 savers/floaters.c                   |   10 +++--
 savers/gs-theme-engine.c            |   18 ++++----
 savers/gs-theme-window.c            |    6 +-
 savers/gste-popsquares.c            |    4 +-
 savers/gste-slideshow.c             |    4 +-
 src/copy-theme-dialog.c             |   11 +++--
 src/gnome-screensaver-dialog.c      |    2 +-
 src/gnome-screensaver-preferences.c |    4 +-
 src/gs-grab-x11.c                   |    2 +-
 src/gs-job.c                        |    2 +-
 src/gs-lock-plug.c                  |   24 +++++-----
 src/gs-window-x11.c                 |   78 ++++++++++++++++++----------------
 13 files changed, 89 insertions(+), 78 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4b729a1..4ba1674 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ DBUS_REQUIRED_VERSION=0.30
 GLIB_REQUIRED_VERSION=2.15.0
 GCONF_REQUIRED_VERSION=2.6.1
 GDK_REQUIRED_VERSION=2.14.0
-GTK_REQUIRED_VERSION=2.11.5
+GTK_REQUIRED_VERSION=2.19.7
 X11_REQUIRED_VERSION=1.0
 LIBGNOME_MENU_REQUIRED_VERSION=2.11.1
 GNOME_DESKTOP_REQUIRED_VERSION=2.29.0
diff --git a/savers/floaters.c b/savers/floaters.c
index 04c49ad..01bf0b2 100644
--- a/savers/floaters.c
+++ b/savers/floaters.c
@@ -1006,7 +1006,7 @@ screen_saver_on_expose_event (ScreenSaver    *screen_saver,
   if (screen_saver->floaters == NULL)
     screen_saver_create_floaters (screen_saver);
 
-  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,
@@ -1064,7 +1064,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;
@@ -1180,6 +1180,7 @@ main (int   argc,
   ScreenSaver *screen_saver;
   GtkWidget *window;
   GtkWidget *drawing_area;
+  GtkStyle *style;
 
   GtkStateType state;
 
@@ -1222,10 +1223,11 @@ main (int   argc,
 
   drawing_area = gtk_drawing_area_new ();
 
+  style = gtk_widget_get_style (drawing_area);
   state = (GtkStateType) 0;
-  while (state < (GtkStateType) G_N_ELEMENTS (drawing_area->style->bg))
+  while (state < (GtkStateType) G_N_ELEMENTS (style->bg))
     {
-      gtk_widget_modify_bg (drawing_area, state, &drawing_area->style->mid[state]);
+      gtk_widget_modify_bg (drawing_area, state, &style->mid[state]);
       state++;
     }
 
diff --git a/savers/gs-theme-engine.c b/savers/gs-theme-engine.c
index 9724e5b..bf89045 100644
--- a/savers/gs-theme-engine.c
+++ b/savers/gs-theme-engine.c
@@ -112,23 +112,25 @@ gs_theme_engine_clear (GtkWidget *widget)
         GdkColor     color = { 0, 0x0000, 0x0000, 0x0000 };
         GdkColormap *colormap;
         GtkStateType state;
+        GdkWindow   *window;
 
         g_return_if_fail (GS_IS_THEME_ENGINE (widget));
 
-        if (! GTK_WIDGET_VISIBLE (widget)) {
+        if (!gtk_widget_get_visible (widget)) {
                 return;
         }
 
         state = (GtkStateType) 0;
-        while (state < (GtkStateType) G_N_ELEMENTS (widget->style->bg)) {
+        while (state < (GtkStateType) G_N_ELEMENTS (gtk_widget_get_style (widget)->bg)) {
                 gtk_widget_modify_bg (widget, state, &color);
                 state++;
         }
 
-        colormap = gdk_drawable_get_colormap (widget->window);
+        window = gtk_widget_get_window (widget);
+        colormap = gdk_drawable_get_colormap (window);
         gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
-        gdk_window_set_background (widget->window, &color);
-        gdk_window_clear (widget->window);
+        gdk_window_set_background (window, &color);
+        gdk_window_clear (window);
         gdk_flush ();
 }
 
@@ -195,11 +197,11 @@ gs_theme_engine_get_window_size (GSThemeEngine *engine,
 
         g_return_if_fail (GS_IS_THEME_ENGINE (engine));
 
-        if (! GTK_WIDGET_VISIBLE (GTK_WIDGET (engine))) {
+        if (!gtk_widget_get_visible (GTK_WIDGET (engine))) {
                 return;
         }
 
-        gdk_window_get_geometry (GTK_WIDGET (engine)->window,
+        gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (engine)),
                                  NULL,
                                  NULL,
                                  width,
@@ -212,5 +214,5 @@ gs_theme_engine_get_window (GSThemeEngine *engine)
 {
         g_return_val_if_fail (GS_IS_THEME_ENGINE (engine), NULL);
 
-        return GTK_WIDGET (engine)->window;
+        return gtk_widget_get_window (GTK_WIDGET (engine));
 }
diff --git a/savers/gs-theme-window.c b/savers/gs-theme-window.c
index 805387c..7adc6ed 100644
--- a/savers/gs-theme-window.c
+++ b/savers/gs-theme-window.c
@@ -169,15 +169,15 @@ gs_theme_window_real_realize (GtkWidget *widget)
                 return;
         }
 
-        gtk_style_set_background (widget->style,
+        gtk_style_set_background (gtk_widget_get_style (widget),
                                   window,
                                   GTK_STATE_NORMAL);
         gdk_window_set_decorations (window, (GdkWMDecoration) 0);
         gdk_window_set_events (window, gdk_window_get_events (window) | event_mask);
 
-        widget->window = window;
+        gtk_widget_set_window (widget, window);
         gdk_window_set_user_data (window, widget);
-        GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+        gtk_widget_set_realized (widget, TRUE);
 
         gdk_window_get_geometry (window, &x, &y, &width, &height, NULL);
 
diff --git a/savers/gste-popsquares.c b/savers/gste-popsquares.c
index cda78c7..6c560a0 100644
--- a/savers/gste-popsquares.c
+++ b/savers/gste-popsquares.c
@@ -270,11 +270,11 @@ set_colors (GdkWindow *window,
 
         widget = gtk_invisible_new ();
 
-        color = widget->style->dark [GTK_STATE_SELECTED];
+        color = gtk_widget_get_style (widget)->dark [GTK_STATE_SELECTED];
         fg->red   = color.red;
         fg->green = color.green;
         fg->blue  = color.blue;
-        color = widget->style->bg [GTK_STATE_SELECTED];
+        color = gtk_widget_get_style (widget)->bg [GTK_STATE_SELECTED];
         bg->red   = color.red;
         bg->green = color.green;
         bg->blue  = color.blue;
diff --git a/savers/gste-slideshow.c b/savers/gste-slideshow.c
index 8ea83bd..e520251 100644
--- a/savers/gste-slideshow.c
+++ b/savers/gste-slideshow.c
@@ -306,7 +306,7 @@ update_display (GSTESlideshow *show)
         cairo_destroy (cr);
 
         /* paint the image buffer into the window */
-        cr = gdk_cairo_create (GTK_WIDGET (show)->window);
+        cr = gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (show)));
 
         cairo_set_source_surface (cr, show->priv->surf, 0, 0);
 
@@ -846,7 +846,7 @@ gste_slideshow_real_configure (GtkWidget         *widget,
                 cairo_surface_destroy (show->priv->surf);
         }
 
-        cr = gdk_cairo_create (widget->window);
+        cr = gdk_cairo_create (gtk_widget_get_window (widget));
         show->priv->surf = cairo_surface_create_similar (cairo_get_target (cr),
                                                          CAIRO_CONTENT_COLOR,
                                                          show->priv->window_width,
diff --git a/src/copy-theme-dialog.c b/src/copy-theme-dialog.c
index 0882171..1feba2f 100644
--- a/src/copy-theme-dialog.c
+++ b/src/copy-theme-dialog.c
@@ -180,6 +180,7 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
 	GtkWidget *vbox;
 	GtkWidget *hbox;
 	GtkWidget *progress_vbox;
+	GtkWidget *content_area;
 	GtkWidget *table;
 	GtkWidget *label;
 	char      *markup;
@@ -200,13 +201,15 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
 	dlg->priv->cancellable = g_cancellable_new ();
 	
 	/* GUI settings */
-	gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox),
+	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
+
+	gtk_container_set_border_width (GTK_CONTAINER (content_area),
 	                                4);
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 4);
+	gtk_box_set_spacing (GTK_BOX (content_area), 4);
 	
 	vbox = gtk_vbox_new (FALSE, 6);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
 	
 	dlg->priv->status = gtk_label_new ("");
 	markup = g_strdup_printf ("<big><b>%s</b></big>", _("Copying files"));
@@ -255,7 +258,7 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
 	gtk_container_set_border_width (GTK_CONTAINER (dlg), 6);
 	
-	gtk_widget_show_all (GTK_DIALOG (dlg)->vbox);
+	gtk_widget_show_all (content_area);
 }
 
 static void
diff --git a/src/gnome-screensaver-dialog.c b/src/gnome-screensaver-dialog.c
index e9c0b41..4ba4b9b 100644
--- a/src/gnome-screensaver-dialog.c
+++ b/src/gnome-screensaver-dialog.c
@@ -83,7 +83,7 @@ get_id_string (GtkWidget *widget)
         g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
 
         id = g_strdup_printf ("%" G_GUINT32_FORMAT,
-                              (guint32) GDK_WINDOW_XID (widget->window));
+                              (guint32) GDK_WINDOW_XID (gtk_widget_get_window (widget)));
         return id;
 }
 
diff --git a/src/gnome-screensaver-preferences.c b/src/gnome-screensaver-preferences.c
index d8376fb..1dd3fda 100644
--- a/src/gnome-screensaver-preferences.c
+++ b/src/gnome-screensaver-preferences.c
@@ -360,7 +360,7 @@ preview_clear (GtkWidget *widget)
         GdkColor color = { 0, 0, 0 };
 
         gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);
-        gdk_window_clear (widget->window);
+        gdk_window_clear (gtk_widget_get_window (widget));
 }
 
 static void
@@ -955,7 +955,7 @@ drag_data_received_cb (GtkWidget        *widget,
         if (!(info == TARGET_URI_LIST || info == TARGET_NS_URL))
                 return;
 
-        files = uri_list_parse ((char *) selection_data->data);
+        files = uri_list_parse ((char *) gtk_selection_data_get_data (selection_data));
         if (files != NULL) {
                 GtkWidget *prefs_dialog;
 
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index 40a3879..eeb8651 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -540,7 +540,7 @@ gs_grab_grab_offscreen (GSGrab *grab,
         gs_debug ("Grabbing an offscreen window");
 
         screen = gtk_invisible_get_screen (GTK_INVISIBLE (grab->priv->invisible));
-        res = gs_grab_grab_window (grab, grab->priv->invisible->window, screen, hide_cursor);
+        res = gs_grab_grab_window (grab, gtk_widget_get_window (grab->priv->invisible), screen, hide_cursor);
 
         return res;
 }
diff --git a/src/gs-job.c b/src/gs-job.c
index e46bb96..9f6b912 100644
--- a/src/gs-job.c
+++ b/src/gs-job.c
@@ -79,7 +79,7 @@ widget_get_id_string (GtkWidget *widget)
         g_return_val_if_fail (widget != NULL, NULL);
 
         id = g_strdup_printf ("0x%X",
-                              (guint32)GDK_WINDOW_XID (widget->window));
+                              (guint32)GDK_WINDOW_XID (gtk_widget_get_window (widget)));
         return id;
 }
 
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index da7d30c..7a930a7 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -408,12 +408,12 @@ gs_lock_plug_run (GSLockPlug *plug)
 
         g_object_ref (plug);
 
-        was_modal = GTK_WINDOW (plug)->modal;
+        was_modal = gtk_window_get_modal (GTK_WINDOW (plug));
         if (!was_modal) {
                 gtk_window_set_modal (GTK_WINDOW (plug), TRUE);
         }
 
-        if (!GTK_WIDGET_VISIBLE (plug)) {
+        if (!gtk_widget_get_visible (GTK_WIDGET (plug))) {
                 gtk_widget_show (GTK_WIDGET (plug));
         }
 
@@ -554,8 +554,8 @@ image_set_from_pixbuf (GtkImage  *image,
 
         radius = w / 10;
 
-        pixmap = gdk_pixmap_new (GTK_WIDGET (image)->window, w, h, -1);
-        bitmask = gdk_pixmap_new (GTK_WIDGET (image)->window, w, h, 1);
+        pixmap = gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (image)), w, h, -1);
+        bitmask = gdk_pixmap_new (gtk_widget_get_window (GTK_WIDGET (image)), w, h, 1);
 
         cr = gdk_cairo_create (pixmap);
         cr_mask = gdk_cairo_create (bitmask);
@@ -570,7 +570,7 @@ image_set_from_pixbuf (GtkImage  *image,
         cairo_set_source_rgb (cr_mask, 1, 1, 1);
         cairo_fill (cr_mask);
 
-        color = GTK_WIDGET (image)->style->bg [GTK_STATE_NORMAL];
+        color = gtk_widget_get_style (GTK_WIDGET (image))->bg [GTK_STATE_NORMAL];
         r = (float)color.red / 65535.0;
         g = (float)color.green / 65535.0;
         b = (float)color.blue / 65535.0;
@@ -947,7 +947,7 @@ gs_lock_plug_close (GSLockPlug *plug)
         GdkEvent  *event;
 
         event = gdk_event_new (GDK_DELETE);
-        event->any.window = g_object_ref (widget->window);
+        event->any.window = g_object_ref (gtk_widget_get_window (widget));
         event->any.send_event = TRUE;
 
         gtk_main_do_event (event);
@@ -1084,7 +1084,7 @@ gs_lock_plug_set_busy (GSLockPlug *plug)
         top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug));
 
         cursor = gdk_cursor_new (GDK_WATCH);
-        gdk_window_set_cursor (top_level->window, cursor);
+        gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor);
         gdk_cursor_unref (cursor);
 }
 
@@ -1097,7 +1097,7 @@ gs_lock_plug_set_ready (GSLockPlug *plug)
         top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug));
 
         cursor = gdk_cursor_new (GDK_LEFT_PTR);
-        gdk_window_set_cursor (top_level->window, cursor);
+        gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor);
         gdk_cursor_unref (cursor);
 }
 
@@ -1119,7 +1119,7 @@ gs_lock_plug_enable_prompt (GSLockPlug *plug,
         gtk_widget_set_sensitive (plug->priv->auth_prompt_entry, TRUE);
         gtk_widget_show (plug->priv->auth_prompt_entry);
 
-        if (! GTK_WIDGET_HAS_FOCUS (plug->priv->auth_prompt_entry)) {
+        if (!gtk_widget_has_focus (plug->priv->auth_prompt_entry)) {
                 gtk_widget_grab_focus (plug->priv->auth_prompt_entry);
         }
 
@@ -1184,8 +1184,8 @@ entry_key_press (GtkWidget   *widget,
         /* if the input widget is visible and ready for input
          * then just carry on as usual
          */
-        if (GTK_WIDGET_VISIBLE (plug->priv->auth_prompt_entry) &&
-            GTK_WIDGET_IS_SENSITIVE (plug->priv->auth_prompt_entry)) {
+        if (gtk_widget_get_visible (plug->priv->auth_prompt_entry) &&
+            gtk_widget_get_sensitive (plug->priv->auth_prompt_entry)) {
                 return FALSE;
         }
 
@@ -1211,7 +1211,7 @@ gs_lock_plug_add_button (GSLockPlug  *plug,
 
         button = gtk_button_new_from_stock (button_text);
 
-        GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+        gtk_widget_set_can_default (button, TRUE);
 
         gtk_widget_show (button);
 
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 4216ea4..fce98d9 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -189,10 +189,10 @@ gs_window_override_user_time (GSWindow *window)
                  * NOTE: Last resort for D-BUS or other non-interactive
                  *       openings.  Causes roundtrip to server.  Lame.
                  */
-                ev_time = gdk_x11_get_server_time (GTK_WIDGET (window)->window);
+                ev_time = gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (window)));
         }
 
-        gdk_x11_window_set_user_time (GTK_WIDGET (window)->window, ev_time);
+        gdk_x11_window_set_user_time (gtk_widget_get_window (GTK_WIDGET (window)), ev_time);
 }
 
 static void
@@ -263,7 +263,7 @@ widget_clear_all_children (GtkWidget *widget)
 
         gdk_error_trap_push ();
 
-        w = widget->window;
+        w = gtk_widget_get_window (widget);
 
         clear_children (GDK_WINDOW_XID (w));
 
@@ -283,7 +283,7 @@ gs_window_set_background_pixmap (GSWindow  *window,
 
         if (pixmap != NULL) {
                 window->priv->background_pixmap = g_object_ref (pixmap);
-                gdk_window_set_back_pixmap (GTK_WIDGET (window)->window,
+                gdk_window_set_back_pixmap (gtk_widget_get_window (GTK_WIDGET (window)),
                                             pixmap,
                                             FALSE);
         }
@@ -297,7 +297,7 @@ gs_window_clear_to_background_pixmap (GSWindow *window)
 
         g_return_if_fail (GS_IS_WINDOW (window));
 
-        if (! GTK_WIDGET_VISIBLE (GTK_WIDGET (window))) {
+        if (!gtk_widget_get_visible (GTK_WIDGET (window))) {
                 return;
         }
 
@@ -308,10 +308,10 @@ gs_window_clear_to_background_pixmap (GSWindow *window)
 
         gs_debug ("Clearing window to background pixmap");
 
-        style = gtk_style_copy (GTK_WIDGET (window)->style);
+        style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (window)));
 
         state = (GtkStateType) 0;
-        while (state < (GtkStateType) G_N_ELEMENTS (GTK_WIDGET (window)->style->bg_pixmap)) {
+        while (state < (GtkStateType) G_N_ELEMENTS (gtk_widget_get_style (GTK_WIDGET (window))->bg_pixmap)) {
 
                 if (style->bg_pixmap[state] != NULL) {
                         g_object_unref (style->bg_pixmap[state]);
@@ -325,12 +325,12 @@ gs_window_clear_to_background_pixmap (GSWindow *window)
         g_object_unref (style);
 
         if (window->priv->background_pixmap != NULL) {
-                gdk_window_set_back_pixmap (GTK_WIDGET (window)->window,
+                gdk_window_set_back_pixmap (gtk_widget_get_window (GTK_WIDGET (window)),
                                             window->priv->background_pixmap,
                                             FALSE);
         }
 
-        gdk_window_clear (GTK_WIDGET (window)->window);
+        gdk_window_clear (gtk_widget_get_window (GTK_WIDGET (window)));
 
         gdk_flush ();
 }
@@ -340,25 +340,28 @@ clear_widget (GtkWidget *widget)
 {
         GdkColor     color = { 0, 0x0000, 0x0000, 0x0000 };
         GdkColormap *colormap;
+        GdkWindow   *window;
         GtkStateType state;
         GtkStyle    *style;
+        GtkStyle    *widget_style;
 
-        if (! GTK_WIDGET_VISIBLE (widget)) {
+        if (!gtk_widget_get_visible (widget)) {
                 return;
         }
 
         gs_debug ("Clearing widget");
 
+        widget_style = gtk_widget_get_style (widget);
         state = (GtkStateType) 0;
-        while (state < (GtkStateType) G_N_ELEMENTS (widget->style->bg)) {
+        while (state < (GtkStateType) G_N_ELEMENTS (widget_style->bg)) {
                 gtk_widget_modify_bg (widget, state, &color);
                 state++;
         }
 
-        style = gtk_style_copy (widget->style);
+        style = gtk_style_copy (widget_style);
 
         state = (GtkStateType) 0;
-        while (state < (GtkStateType) G_N_ELEMENTS (widget->style->bg_pixmap)) {
+        while (state < (GtkStateType) G_N_ELEMENTS (widget_style->bg_pixmap)) {
 
                 if (style->bg_pixmap[state] != NULL) {
                         g_object_unref (style->bg_pixmap[state]);
@@ -368,14 +371,15 @@ clear_widget (GtkWidget *widget)
                 state++;
         }
 
-        colormap = gdk_drawable_get_colormap (widget->window);
+        window = gtk_widget_get_window (widget);
+        colormap = gdk_drawable_get_colormap (window);
         gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
-        gdk_window_set_background (widget->window, &color);
+        gdk_window_set_background (window, &color);
 
         gtk_widget_set_style (widget, style);
         g_object_unref (style);
 
-        gdk_window_clear (widget->window);
+        gdk_window_clear (window);
 
         /* If a screensaver theme adds child windows we need to clear them too */
         widget_clear_all_children (widget);
@@ -402,7 +406,7 @@ get_outside_region (GSWindow *window)
         for (i = 0; i < window->priv->monitor; i++) {
                 GdkRectangle geometry;
 
-                gdk_screen_get_monitor_geometry (GTK_WINDOW (window)->screen,
+                gdk_screen_get_monitor_geometry (gtk_window_get_screen (GTK_WINDOW (window)),
                                                    i, &geometry);
                 gdk_region_union_with_rect (region, &geometry);
         }
@@ -419,7 +423,7 @@ update_geometry (GSWindow *window)
 
         outside_region = get_outside_region (window);
 
-        gdk_screen_get_monitor_geometry (GTK_WINDOW (window)->screen,
+        gdk_screen_get_monitor_geometry (gtk_window_get_screen (GTK_WINDOW (window)),
                                          window->priv->monitor,
                                          &geometry);
         gs_debug ("got geometry for monitor %d: x=%d y=%d w=%d h=%d",
@@ -466,7 +470,7 @@ gs_window_move_resize_window (GSWindow *window,
 
         widget = GTK_WIDGET (window);
 
-        g_assert (GTK_WIDGET_REALIZED (widget));
+        g_assert (gtk_widget_get_realized (widget));
 
         gs_debug ("Move and/or resize window on monitor %d: x=%d y=%d w=%d h=%d",
                   window->priv->monitor,
@@ -476,17 +480,17 @@ gs_window_move_resize_window (GSWindow *window,
                   window->priv->geometry.height);
 
         if (move && resize) {
-                gdk_window_move_resize (widget->window,
+                gdk_window_move_resize (gtk_widget_get_window (widget),
                                         window->priv->geometry.x,
                                         window->priv->geometry.y,
                                         window->priv->geometry.width,
                                         window->priv->geometry.height);
         } else if (move) {
-                gdk_window_move (widget->window,
+                gdk_window_move (gtk_widget_get_window (widget),
                                  window->priv->geometry.x,
                                  window->priv->geometry.y);
         } else if (resize) {
-                gdk_window_resize (widget->window,
+                gdk_window_resize (gtk_widget_get_window (widget),
                                    window->priv->geometry.width,
                                    window->priv->geometry.height);
         }
@@ -687,7 +691,7 @@ watchdog_timer (GSWindow *window)
 {
         GtkWidget *widget = GTK_WIDGET (window);
 
-        gdk_window_focus (widget->window, GDK_CURRENT_TIME);
+        gdk_window_focus (gtk_widget_get_window (widget), GDK_CURRENT_TIME);
 
         return TRUE;
 }
@@ -748,7 +752,7 @@ gs_window_raise (GSWindow *window)
 
         gs_debug ("Raising screensaver window");
 
-        win = GTK_WIDGET (window)->window;
+        win = gtk_widget_get_window (GTK_WIDGET (window));
 
         gdk_window_raise (win);
 }
@@ -773,7 +777,7 @@ x11_window_is_ours (Window window)
 static void
 unshape_window (GSWindow *window)
 {
-        gdk_window_shape_combine_region (GTK_WIDGET (window)->window,
+        gdk_window_shape_combine_region (gtk_widget_get_window (GTK_WIDGET (window)),
                                          NULL,
                                          0,
                                          0);
@@ -869,7 +873,7 @@ window_select_shape_events (GSWindow *window)
 
         if (XShapeQueryExtension (GDK_DISPLAY (), &window->priv->shape_event_base, &shape_error_base)) {
                 events = ShapeNotifyMask;
-                XShapeSelectInput (GDK_DISPLAY (), GDK_WINDOW_XID (GTK_WIDGET (window)->window), events);
+                XShapeSelectInput (GDK_DISPLAY (), GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))), events);
         }
 
         gdk_display_sync (gdk_display_get_default ());
@@ -888,7 +892,7 @@ gs_window_real_show (GtkWidget *widget)
 
         gs_window_clear (GS_WINDOW (widget));
 
-        set_invisible_cursor (widget->window, TRUE);
+        set_invisible_cursor (gtk_widget_get_window (widget), TRUE);
 
         window = GS_WINDOW (widget);
         if (window->priv->timer) {
@@ -1033,7 +1037,7 @@ gs_window_get_gdk_window (GSWindow *window)
 {
         g_return_val_if_fail (GS_IS_WINDOW (window), NULL);
 
-        return GTK_WIDGET (window)->window;
+        return gtk_widget_get_window (GTK_WIDGET (window));
 }
 
 GtkWidget *
@@ -1114,7 +1118,7 @@ spawn_on_window (GSWindow *window,
         }
 
         error = NULL;
-        result = gdk_spawn_on_screen_with_pipes (GTK_WINDOW (window)->screen,
+        result = gdk_spawn_on_screen_with_pipes (gtk_window_get_screen (GTK_WINDOW (window)),
                                                  NULL,
                                                  argv,
                                                  NULL,
@@ -1552,7 +1556,7 @@ popdown_dialog (GSWindow *window)
         gtk_widget_show (window->priv->drawing_area);
 
         gs_window_clear (window);
-        set_invisible_cursor (GTK_WIDGET (window)->window, TRUE);
+        set_invisible_cursor (gtk_widget_get_window (GTK_WIDGET (window)), TRUE);
 
         window_set_dialog_up (window, FALSE);
 
@@ -1714,7 +1718,7 @@ popup_dialog (GSWindow *window)
 
         gs_window_clear_to_background_pixmap (window);
 
-        set_invisible_cursor (GTK_WIDGET (window)->window, FALSE);
+        set_invisible_cursor (gtk_widget_get_window (GTK_WIDGET (window)), FALSE);
 
         window->priv->dialog_quit_requested = FALSE;
         window->priv->dialog_shake_in_progress = FALSE;
@@ -1749,7 +1753,7 @@ gs_window_request_unlock (GSWindow *window)
 
         gs_debug ("Requesting unlock");
 
-        if (! GTK_WIDGET_VISIBLE (GTK_WIDGET (window))) {
+        if (! gtk_widget_get_visible (GTK_WIDGET (window))) {
                 gs_debug ("Request unlock but window is not visible!");
                 return;
         }
@@ -1813,7 +1817,7 @@ gs_window_get_screen (GSWindow  *window)
 {
         g_return_val_if_fail (GS_IS_WINDOW (window), NULL);
 
-        return GTK_WINDOW (window)->screen;
+        return gtk_window_get_screen (GTK_WINDOW (window));
 }
 
 void
@@ -2043,7 +2047,7 @@ maybe_handle_activity (GSWindow *window)
 
         /* if we already have a socket then don't bother */
         if (! window->priv->lock_socket
-            && GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (window))) {
+            && gtk_widget_get_sensitive (GTK_WIDGET (window))) {
                 g_signal_emit (window, signals [ACTIVITY], 0, &handled);
         }
 
@@ -2147,8 +2151,8 @@ gs_window_real_size_request (GtkWidget      *widget,
         window = GS_WINDOW (widget);
         bin = GTK_BIN (widget);
 
-        if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) {
-                gtk_widget_size_request (bin->child, requisition);
+        if (gtk_bin_get_child (bin) && gtk_widget_get_visible (gtk_bin_get_child (bin))) {
+                gtk_widget_size_request (gtk_bin_get_child (bin), requisition);
         }
 
         old_geometry = window->priv->geometry;
@@ -2158,7 +2162,7 @@ gs_window_real_size_request (GtkWidget      *widget,
         requisition->width  = window->priv->geometry.width;
         requisition->height = window->priv->geometry.height;
 
-        if (! GTK_WIDGET_REALIZED (widget)) {
+        if (!gtk_widget_get_realized (widget)) {
                 return;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]