From 48bbc4a9a1606b76cac2382b93743fb22dc044c7 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 7 Apr 2022 14:02:34 +0800 Subject: [PATCH] Fix DND bugs on GTK * src/xterm.c (handle_one_xevent): Don't let some client messages reach the toolkit. --- src/xterm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 58a4fc6117a..4e2091a0de9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13540,6 +13540,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, else x_dnd_action = None; } + + goto done; } if (event->xclient.message_type == dpyinfo->Xatom_XdndFinished @@ -13554,6 +13556,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_waiting_for_finish_proto >= 5 && !(event->xclient.data.l[1] & 1)) x_dnd_action = None; + + goto done; } if ((event->xclient.message_type @@ -13579,7 +13583,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, && operation != XM_DRAG_LINK) { x_dnd_waiting_for_finish = false; - goto OTHER; + goto done; } if (status != XM_DROP_SITE_VALID @@ -13587,7 +13591,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, || action == XM_DROP_ACTION_DROP_HELP)) { x_dnd_waiting_for_finish = false; - goto OTHER; + goto done; } switch (operation) @@ -13606,7 +13610,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, } x_dnd_waiting_for_motif_finish = 2; - goto OTHER; + goto done; } } -- 2.39.5