emacs-diffs
[Top][All Lists]
Advanced

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

master e4ed7e0ce9: Reset Motif DND protocol numbers when writing targets


From: Po Lu
Subject: master e4ed7e0ce9: Reset Motif DND protocol numbers when writing targets table
Date: Wed, 20 Apr 2022 04:06:27 -0400 (EDT)

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

    Reset Motif DND protocol numbers when writing targets table
    
    * src/xterm.c (xm_setup_dnd_targets): Set header.protocol to 0
    when writing table.
---
 src/xterm.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 92c8ac09c9..0243b3cf96 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1662,9 +1662,17 @@ xm_setup_dnd_targets (struct x_display_info *dpyinfo,
     }
 
   if (!rc)
-    xm_write_targets_table (dpyinfo->display, drag_window,
-                           dpyinfo->Xatom_MOTIF_DRAG_TARGETS,
-                           &header, recs);
+    {
+      /* Some implementations of Motif DND set the protocol version of
+        just the targets table to 1 without actually changing the
+        data format.  To avoid confusing Motif when that happens, set
+        it back to 0.  There will probably be no more updates to the
+        protocol either.  */
+      header.protocol = 0;
+      xm_write_targets_table (dpyinfo->display, drag_window,
+                             dpyinfo->Xatom_MOTIF_DRAG_TARGETS,
+                             &header, recs);
+    }
 
   XUngrabServer (dpyinfo->display);
 



reply via email to

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