[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1302c329eb: Fix link action handling with Motif DND
From: |
Po Lu |
Subject: |
master 1302c329eb: Fix link action handling with Motif DND |
Date: |
Tue, 14 Jun 2022 23:37:51 -0400 (EDT) |
branch: master
commit 1302c329eb09b40a8895198fc0ec98b3abac6b96
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix link action handling with Motif DND
* src/xterm.c (enum xm_drag_operation): New alternate
definition.
(XM_DRAG_OPERATION_IS_LINK): New macro.
(handle_one_xevent): Use it instead.
---
src/xterm.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 7f78f40bb7..bf8a33f70c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1504,12 +1504,16 @@ typedef struct xm_top_level_leave_message
enum xm_drag_operation
{
- XM_DRAG_NOOP = 0,
- XM_DRAG_MOVE = (1L << 0),
- XM_DRAG_COPY = (1L << 1),
- XM_DRAG_LINK = (1L << 2),
+ XM_DRAG_NOOP = 0,
+ XM_DRAG_MOVE = (1L << 0),
+ XM_DRAG_COPY = (1L << 1),
+ XM_DRAG_LINK = (1L << 2),
+ XM_DRAG_LINK_REC = 3,
};
+#define XM_DRAG_OPERATION_IS_LINK(op) ((op) == XM_DRAG_LINK \
+ || (op) == XM_DRAG_LINK_REC)
+
enum xm_drag_action
{
XM_DROP_ACTION_DROP = 0,
@@ -16097,7 +16101,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
if (operation != XM_DRAG_MOVE
&& operation != XM_DRAG_COPY
- && operation != XM_DRAG_LINK)
+ && XM_DRAG_OPERATION_IS_LINK (operation))
{
x_dnd_waiting_for_finish = false;
goto done;
@@ -16121,7 +16125,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_dnd_action = dpyinfo->Xatom_XdndActionCopy;
break;
- case XM_DRAG_LINK:
+ /* This means XM_DRAG_OPERATION_IS_LINK (operation). */
+ default:
x_dnd_action = dpyinfo->Xatom_XdndActionLink;
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1302c329eb: Fix link action handling with Motif DND,
Po Lu <=