From 454f1391d67381f39205e64ea8f926c149809104 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 9 Oct 2009 11:24:21 +0200 Subject: [PATCH] Use gtk_widget_get_window() instead of widget->window --- app/gui/gui-vtable.c | 6 +++--- app/gui/splash.c | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c index f05beb4c9d..4acbb88da8 100644 --- a/app/gui/gui-vtable.c +++ b/app/gui/gui-vtable.c @@ -242,11 +242,11 @@ gui_get_display_name (Gimp *gimp, if (display) { - GimpDisplayShell *shell = gimp_display_get_shell (display); + GimpDisplayShell *shell = gimp_display_get_shell (display); + GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (shell)); screen = gtk_widget_get_screen (GTK_WIDGET (shell)); - monitor = gdk_screen_get_monitor_at_window (screen, - GTK_WIDGET (shell)->window); + monitor = gdk_screen_get_monitor_at_window (screen, window); } else { diff --git a/app/gui/splash.c b/app/gui/splash.c index 150516d554..f0dd4ffc20 100644 --- a/app/gui/splash.c +++ b/app/gui/splash.c @@ -168,19 +168,21 @@ splash_create (gboolean be_verbose) &values.foreground); gtk_widget_realize (splash->area); - splash->gc = gdk_gc_new_with_values (splash->area->window, &values, + splash->gc = gdk_gc_new_with_values (gtk_widget_get_window (splash->area), + &values, GDK_GC_FOREGROUND); if (gdk_pixbuf_animation_is_static_image (pixbuf)) { - GdkPixmap *pixmap = gdk_pixmap_new (splash->area->window, + GdkPixmap *pixmap = gdk_pixmap_new (gtk_widget_get_window (splash->area), splash->width, splash->height, -1); gdk_draw_pixbuf (pixmap, splash->gc, gdk_pixbuf_animation_get_static_image (pixbuf), 0, 0, 0, 0, splash->width, splash->height, GDK_RGB_DITHER_NORMAL, 0, 0); - gdk_window_set_back_pixmap (splash->area->window, pixmap, FALSE); + gdk_window_set_back_pixmap (gtk_widget_get_window (splash->area), + pixmap, FALSE); g_object_unref (pixmap); } @@ -264,10 +266,10 @@ splash_area_expose (GtkWidget *widget, { gdk_gc_set_clip_region (splash->gc, event->region); - gdk_draw_layout (widget->window, splash->gc, + gdk_draw_layout (gtk_widget_get_window (widget), splash->gc, splash->upper_x, splash->upper_y, splash->upper); - gdk_draw_layout (widget->window, splash->gc, + gdk_draw_layout (gtk_widget_get_window (widget), splash->gc, splash->lower_x, splash->lower_y, splash->lower); return FALSE;