[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ebd5725e0b: Fix an infinite loop if the window manager pings Emac
From: |
Po Lu |
Subject: |
master ebd5725e0b: Fix an infinite loop if the window manager pings Emacs during DND |
Date: |
Wed, 23 Mar 2022 23:42:49 -0400 (EDT) |
branch: master
commit ebd5725e0b2f7e1dcf6dcb068bef638edd7f0cb4
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix an infinite loop if the window manager pings Emacs during DND
* src/xterm.c (handle_one_xevent): Work around _NET_WM_PING
infinite loop during drag and drop.
---
src/xterm.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/xterm.c b/src/xterm.c
index 0543f152ed..fcc1f55ccb 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11014,7 +11014,19 @@ handle_one_xevent (struct x_display_info *dpyinfo,
send_event.xclient.window = dpyinfo->root_window;
XSendEvent (dpyinfo->display, dpyinfo->root_window, False,
- SubstructureRedirectMask | SubstructureNotifyMask,
+ /* FIXME: handling window stacking changes
+ during drag-and-drop requires Emacs to
+ select for SubstructureNotifyMask,
+ which in turn causes the message to be
+ sent to Emacs itself using the event
+ mask specified by the EWMH. To avoid
+ an infinite loop, just use
+ SubstructureRedirectMask when a
+ drag-and-drop operation is in
+ progress. */
+ ((x_dnd_in_progress || x_dnd_waiting_for_finish)
+ ? SubstructureRedirectMask
+ : SubstructureRedirectMask |
SubstructureNotifyMask),
&send_event);
*finish = X_EVENT_DROP;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ebd5725e0b: Fix an infinite loop if the window manager pings Emacs during DND,
Po Lu <=