From c329940cf1bfbf260c5aba38e0191a2a37c52c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sun, 26 Nov 2017 13:10:44 +0000 Subject: [PATCH] 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 --- gdk/win32/gdkdnd-win32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c index cb7eaa5c37..d650a70d0d 100644 --- a/gdk/win32/gdkdnd-win32.c +++ b/gdk/win32/gdkdnd-win32.c @@ -575,6 +575,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, gdk_get_default_root_window ()); g_set_object (&sel_win32->target_drag_context, context); context->actions = GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE;