From 8c031d8fcf04a9d79f7a1e90bc0c59d27b16e3b8 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 1 Apr 2022 14:13:44 +0800 Subject: [PATCH] Only read 16 bytes of motif drag receiver info * src/xterm.c (xm_drag_receiver_info): Only read 16 bytes of receiver info. (handle_one_xevent): Fix default XM drop action. --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index b2059e69aa5..ed4d0a6d272 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1494,7 +1494,7 @@ xm_read_drag_receiver_info (struct x_display_info *dpyinfo, x_catch_errors (dpyinfo->display); rc = XGetWindowProperty (dpyinfo->display, wdesc, dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, - 0, LONG_MAX, False, + 0, 4, False, dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, &actual_type, &actual_format, &nitems, &bytes_remaining, @@ -14452,7 +14452,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, = XM_DRAG_SIDE_EFFECT (xm_side_effect_from_action (dpyinfo, x_dnd_wanted_action), XM_DROP_SITE_VALID, XM_DRAG_NOOP, - (x_dnd_xm_use_help + (!x_dnd_xm_use_help ? XM_DROP_ACTION_DROP : XM_DROP_ACTION_DROP_HELP)); dmsg.timestamp = event->xbutton.time; @@ -15508,7 +15508,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XM_DROP_SITE_VALID, xm_side_effect_from_action (dpyinfo, x_dnd_wanted_action), - (x_dnd_xm_use_help + (!x_dnd_xm_use_help ? XM_DROP_ACTION_DROP : XM_DROP_ACTION_DROP_HELP)); dmsg.timestamp = xev->time; -- 2.39.2