]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix manually disowning Emacs drag atoms
authorPo Lu <luangruo@yahoo.com>
Tue, 5 Jul 2022 11:17:03 +0000 (19:17 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 5 Jul 2022 11:17:37 +0000 (19:17 +0800)
* src/xterm.c (handle_one_xevent): Disown Motif drag atom if
eventp->time is CurrentTime as well.  This can happen with some
synthetic events.

src/xterm.c

index 771db4a05c9332ff2487e70d97ada37ef3c49ea3..4a47fdfd45018eb2b928c626315c1b15c4a2c90e 100644 (file)
@@ -16908,7 +16908,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
         const XSelectionClearEvent *eventp = &event->xselectionclear;
 
        if (eventp->selection == dpyinfo->motif_drag_atom
-           && dpyinfo->motif_drag_atom_time <= eventp->time)
+           && (eventp->time == CurrentTime
+               || dpyinfo->motif_drag_atom_time <= eventp->time))
          dpyinfo->motif_drag_atom = None;
 
         inev.sie.kind = SELECTION_CLEAR_EVENT;