aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-19 02:48:36 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-19 02:48:36 +0800
commit26d26391da4d38236c7767b6f3601c0b4852c786 (patch)
treec97f63b75dc4366b25bfdd42c1512f3fe56e5452
parenta5117de9a5714c6845d72a124f94f8572de54b73 (diff)
downloadgsoc2013-evolution-26d26391da4d38236c7767b6f3601c0b4852c786.tar.gz
gsoc2013-evolution-26d26391da4d38236c7767b6f3601c0b4852c786.tar.zst
gsoc2013-evolution-26d26391da4d38236c7767b6f3601c0b4852c786.zip
Use ->bin_window [instead of ->window] if the widget is a GtkLayout.
* e-gtk-utils.c (widget_realize_callback_for_backing_store): Use ->bin_window [instead of ->window] if the widget is a GtkLayout. svn path=/trunk/; revision=12943
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-gtk-utils.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 1cdde3e591..3c4ee3133e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-18 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-gtk-utils.c (widget_realize_callback_for_backing_store): Use
+ ->bin_window [instead of ->window] if the widget is a GtkLayout.
+
2001-09-17 Damon Chaplin <damon@ximian.com>
* e-time-utils.c (e_time_parse_date): only use 1 format, so we are
diff --git a/e-util/e-gtk-utils.c b/e-util/e-gtk-utils.c
index 564d834cfb..f865dabf8d 100644
--- a/e-util/e-gtk-utils.c
+++ b/e-util/e-gtk-utils.c
@@ -26,7 +26,9 @@
#include <config.h>
#endif
+#include <gtk/gtklayout.h>
#include <gtk/gtksignal.h>
+#include <gtk/gtkwidget.h>
#include <gdk/gdkx.h>
@@ -119,10 +121,15 @@ widget_realize_callback_for_backing_store (GtkWidget *widget,
void *data)
{
XSetWindowAttributes attributes;
+ GdkWindow *window;
+
+ if (GTK_IS_LAYOUT (widget))
+ window = GTK_LAYOUT (widget)->bin_window;
+ else
+ window = widget->window;
attributes.backing_store = Always;
- XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (widget->window),
- GDK_WINDOW_XWINDOW (widget->window),
+ XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XWINDOW (window),
CWBackingStore, &attributes);
}