summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <bratsche@gnome.org>2010-06-01 10:32:18 -0500
committerCody Russell <bratsche@gnome.org>2010-06-01 10:32:18 -0500
commit8e142788a5e1ee0575d2f9963038a29a903d687e (patch)
treea2c23f95e41d8c2750960731f1c2c0b8436a0f76
parent5c283cacbe4ee9eb21a579612b86d328bc54e4b2 (diff)
downloadgtk+-8e142788a5e1ee0575d2f9963038a29a903d687e.tar.gz
Bug 608218 - GtkOffscreenWindow causes bad window with GtkEntry
We now exit early from gdk_window_register_dnd() to avoid crashing if the window type is GDK_WINDOW_OFFSCREEN and does not support dnd operations. This makes it possible to use any dnd-enabled widgets, such as GtkEntry, within a GtkOffscreenWindow.
-rw-r--r--gdk/x11/gdkdnd-x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index acce83bb84..9a474b906a 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -3926,6 +3926,9 @@ gdk_window_register_dnd (GdkWindow *window)
g_return_if_fail (window != NULL);
+ if (gdk_window_get_window_type (window) == GDK_WINDOW_OFFSCREEN)
+ return;
+
base_precache_atoms (display);
if (g_object_get_data (G_OBJECT (window), "gdk-dnd-registered") != NULL)