summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2017-11-26 13:10:44 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2017-12-02 10:38:41 +0000
commitc89c19d2f982331c035a479ac5ffc2900f5aa71a (patch)
treebfc390326aeae454b49773794562bb488726ef44 /gdk/win32
parentf0d04f82f8c2835b9c062bb72fa4409328c4c9ed (diff)
downloadgtk+-c89c19d2f982331c035a479ac5ffc2900f5aa71a.tar.gz
GDK W32: Make sure drag source window is not NULL
This prevents GTK from throwing a bunch of warnings when it tries to get drag source window -> screen of that window -> ipc widget for that screen, and then tries to attach a signal handler to that widget. Specifically, this happens when we get a DnD move from another application. https://bugzilla.gnome.org/show_bug.cgi?id=786509
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkdnd-win32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c
index 3e4b2e6f60..acc04ea944 100644
--- a/gdk/win32/gdkdnd-win32.c
+++ b/gdk/win32/gdkdnd-win32.c
@@ -587,6 +587,8 @@ idroptarget_dragenter (LPDROPTARGET This,
*/
if (current_src_context && current_src_context->context)
g_set_object (&context->source_window, current_src_context->context->source_window);
+ else
+ g_set_object (&context->source_window, NULL); /* FIXME: Root window used to be here. Find a substitute? */
g_set_object (&sel_win32->target_drag_context, context);
context->actions = GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE;