aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-07-05 19:17:03 +0800
committerPo Lu2022-07-05 19:17:37 +0800
commit9298a571ebb15b3020c9e865d0a34cff4a07e77e (patch)
tree399ff559d92cc9817f8c53854a199b3915684241 /src
parent678453ebc65cc075fbf777a9b41557c26de544f2 (diff)
downloademacs-9298a571ebb15b3020c9e865d0a34cff4a07e77e.tar.gz
emacs-9298a571ebb15b3020c9e865d0a34cff4a07e77e.zip
Fix manually disowning Emacs drag atoms
* src/xterm.c (handle_one_xevent): Disown Motif drag atom if eventp->time is CurrentTime as well. This can happen with some synthetic events.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 771db4a05c9..4a47fdfd450 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -16908,7 +16908,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
16908 const XSelectionClearEvent *eventp = &event->xselectionclear; 16908 const XSelectionClearEvent *eventp = &event->xselectionclear;
16909 16909
16910 if (eventp->selection == dpyinfo->motif_drag_atom 16910 if (eventp->selection == dpyinfo->motif_drag_atom
16911 && dpyinfo->motif_drag_atom_time <= eventp->time) 16911 && (eventp->time == CurrentTime
16912 || dpyinfo->motif_drag_atom_time <= eventp->time))
16912 dpyinfo->motif_drag_atom = None; 16913 dpyinfo->motif_drag_atom = None;
16913 16914
16914 inev.sie.kind = SELECTION_CLEAR_EVENT; 16915 inev.sie.kind = SELECTION_CLEAR_EVENT;