Use gtk_widget_get_window() instead of widget->window

This commit is contained in:
Michael Natterer 2009-10-09 11:24:21 +02:00
parent 83c092bfe2
commit 454f1391d6
2 changed files with 10 additions and 8 deletions

View File

@ -242,11 +242,11 @@ gui_get_display_name (Gimp *gimp,
if (display) 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)); screen = gtk_widget_get_screen (GTK_WIDGET (shell));
monitor = gdk_screen_get_monitor_at_window (screen, monitor = gdk_screen_get_monitor_at_window (screen, window);
GTK_WIDGET (shell)->window);
} }
else else
{ {

View File

@ -168,19 +168,21 @@ splash_create (gboolean be_verbose)
&values.foreground); &values.foreground);
gtk_widget_realize (splash->area); 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); GDK_GC_FOREGROUND);
if (gdk_pixbuf_animation_is_static_image (pixbuf)) 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); splash->width, splash->height, -1);
gdk_draw_pixbuf (pixmap, splash->gc, gdk_draw_pixbuf (pixmap, splash->gc,
gdk_pixbuf_animation_get_static_image (pixbuf), gdk_pixbuf_animation_get_static_image (pixbuf),
0, 0, 0, 0, splash->width, splash->height, 0, 0, 0, 0, splash->width, splash->height,
GDK_RGB_DITHER_NORMAL, 0, 0); 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); g_object_unref (pixmap);
} }
@ -264,10 +266,10 @@ splash_area_expose (GtkWidget *widget,
{ {
gdk_gc_set_clip_region (splash->gc, event->region); 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); 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); splash->lower_x, splash->lower_y, splash->lower);
return FALSE; return FALSE;