aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-07-06 09:01:02 +0800
committerPo Lu2022-07-06 09:01:02 +0800
commitcd18cee96ee17562a276ea84bc9313e5bcbccb55 (patch)
treeb9b597cb9363a4eb05c8b8d02da94bfd3c32b2dc /src
parent6230ed6d63a9867212d0aa20db6cd6c73581d56e (diff)
downloademacs-cd18cee96ee17562a276ea84bc9313e5bcbccb55.tar.gz
emacs-cd18cee96ee17562a276ea84bc9313e5bcbccb55.zip
Don't select for unnecessary properties during DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't select for property changes when not using toplevels.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 8373222cfc3..2643d1120f9 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11388,6 +11388,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
11388#ifndef USE_GTK 11388#ifndef USE_GTK
11389 struct x_display_info *event_display; 11389 struct x_display_info *event_display;
11390#endif 11390#endif
11391 unsigned int additional_mask;
11391 11392
11392 base = SPECPDL_INDEX (); 11393 base = SPECPDL_INDEX ();
11393 11394
@@ -11598,7 +11599,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
11598 if (EQ (return_frame, Qnow)) 11599 if (EQ (return_frame, Qnow))
11599 x_dnd_return_frame = 2; 11600 x_dnd_return_frame = 2;
11600 11601
11601 /* Now select for SubstructureNotifyMask and PropertyNotifyMask on 11602 /* Now select for SubstructureNotifyMask and PropertyChangeMask on
11602 the root window, so we can get notified when window stacking 11603 the root window, so we can get notified when window stacking
11603 changes, a common operation during drag-and-drop. */ 11604 changes, a common operation during drag-and-drop. */
11604 11605
@@ -11606,11 +11607,15 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
11606 FRAME_DISPLAY_INFO (f)->root_window, 11607 FRAME_DISPLAY_INFO (f)->root_window,
11607 &root_window_attrs); 11608 &root_window_attrs);
11608 11609
11610 additional_mask = SubstructureNotifyMask;
11611
11612 if (x_dnd_use_toplevels)
11613 additional_mask |= PropertyChangeMask;
11614
11609 XSelectInput (FRAME_X_DISPLAY (f), 11615 XSelectInput (FRAME_X_DISPLAY (f),
11610 FRAME_DISPLAY_INFO (f)->root_window, 11616 FRAME_DISPLAY_INFO (f)->root_window,
11611 root_window_attrs.your_event_mask 11617 root_window_attrs.your_event_mask
11612 | SubstructureNotifyMask 11618 | additional_mask);
11613 | PropertyChangeMask);
11614 11619
11615 if (EQ (return_frame, Qnow)) 11620 if (EQ (return_frame, Qnow))
11616 x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime); 11621 x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime);