[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a380ce2008: Make it easier to clear the Motif drag window for deb
From: |
Po Lu |
Subject: |
master a380ce2008: Make it easier to clear the Motif drag window for debugging |
Date: |
Sun, 11 Sep 2022 04:50:37 -0400 (EDT) |
branch: master
commit a380ce2008e944486946b0083aa58cc8161176c6
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Make it easier to clear the Motif drag window for debugging
* src/xterm.c (xm_get_drag_window_1): Add comment explaining
side effect of x_special_window_exists_p.
(handle_one_xevent): Clear Motif drag window upon DestroyNotify.
In addition to debugging, it also reduces syncs necessary to
communicate via the Motif protocol after a defective/old client
sets the drag window without setting the disconnect mode.
---
src/xterm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 4ac42a9138..12234351a3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1971,6 +1971,10 @@ xm_get_drag_window_1 (struct x_display_info *dpyinfo)
&& tmp_data)
{
drag_window = *(Window *) tmp_data;
+
+ /* This has the side effect of selecting for
+ StructureNotifyMask, meaning that we will get notifications
+ once it is deleted. */
rc = x_special_window_exists_p (dpyinfo, drag_window);
if (!rc)
@@ -20707,6 +20711,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
== dpyinfo->net_supported_window)
dpyinfo->net_supported_window = None;
+ if (event->xdestroywindow.window
+ == dpyinfo->motif_drag_window)
+ /* We get DestroyNotify events for the drag window because
+ x_special_window_exists_p selects for structure
+ notification. The drag window is not supposed to go away
+ but not all clients obey that requirement when setting the
+ drag window property. */
+ dpyinfo->motif_drag_window = None;
+
xft_settings_event (dpyinfo, event);
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a380ce2008: Make it easier to clear the Motif drag window for debugging,
Po Lu <=