emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8c031d8fcf: Only read 16 bytes of motif drag receiver info


From: Po Lu
Subject: master 8c031d8fcf: Only read 16 bytes of motif drag receiver info
Date: Fri, 1 Apr 2022 02:16:26 -0400 (EDT)

branch: master
commit 8c031d8fcf04a9d79f7a1e90bc0c59d27b16e3b8
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 b2059e69aa..ed4d0a6d27 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]