#ifndef USE_GTK
struct x_display_info *event_display;
#endif
+ unsigned int additional_mask;
base = SPECPDL_INDEX ();
if (EQ (return_frame, Qnow))
x_dnd_return_frame = 2;
- /* Now select for SubstructureNotifyMask and PropertyNotifyMask on
+ /* Now select for SubstructureNotifyMask and PropertyChangeMask on
the root window, so we can get notified when window stacking
changes, a common operation during drag-and-drop. */
FRAME_DISPLAY_INFO (f)->root_window,
&root_window_attrs);
+ additional_mask = SubstructureNotifyMask;
+
+ if (x_dnd_use_toplevels)
+ additional_mask |= PropertyChangeMask;
+
XSelectInput (FRAME_X_DISPLAY (f),
FRAME_DISPLAY_INFO (f)->root_window,
root_window_attrs.your_event_mask
- | SubstructureNotifyMask
- | PropertyChangeMask);
+ | additional_mask);
if (EQ (return_frame, Qnow))
x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime);