[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3285901e9a: Fix timestamps recorded in Motif DND top level leave
From: |
Po Lu |
Subject: |
master 3285901e9a: Fix timestamps recorded in Motif DND top level leave messages |
Date: |
Sat, 18 Jun 2022 22:31:44 -0400 (EDT) |
branch: master
commit 3285901e9a87f083bf88ac732a3ed2eae6488fec
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix timestamps recorded in Motif DND top level leave messages
* src/xterm.c (xm_send_top_level_leave_message): Use X_SHRT_MAX
since Motif treats x and y as signed.
(handle_one_xevent): Use correct time for lmsg.timestamp sent in
response to entering the return-frame.
---
src/xterm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 885344229a..f9f3e938e0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2454,8 +2454,13 @@ xm_send_top_level_leave_message (struct x_display_info
*dpyinfo, Window source,
XM_DROP_SITE_NONE,
x_dnd_motif_operations,
XM_DROP_ACTION_DROP_CANCEL);
mmsg.timestamp = dmsg->timestamp;
- mmsg.x = 65535;
- mmsg.y = 65535;
+
+ /* Use X_SHRT_MAX instead of the max value of uint16_t since
+ that will be interpreted as a plausible position by Motif,
+ and as such breaks if the drop target is beneath that
+ position. */
+ mmsg.x = X_SHRT_MAX;
+ mmsg.y = X_SHRT_MAX;
xm_send_drag_motion_message (dpyinfo, source, target, &mmsg);
}
@@ -19757,7 +19762,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
XM_DRAG_REASON_TOP_LEVEL_LEAVE);
lmsg.byteorder = XM_BYTE_ORDER_CUR_FIRST;
lmsg.zero = 0;
- lmsg.timestamp = event->xmotion.time;
+ lmsg.timestamp = xev->time;
lmsg.source_window = FRAME_X_WINDOW (x_dnd_frame);
if (x_dnd_motif_setup_p)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3285901e9a: Fix timestamps recorded in Motif DND top level leave messages,
Po Lu <=