From 6aa8baaea1b872a9b770d680849b9b1b95eb2840 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 12 Jun 2022 10:17:19 +0800 Subject: [PATCH] Use cached monitor info during DND if available * src/xterm.c (x_dnd_begin_drag_and_drop): Use previously cached monitor attributes if they exist. --- src/xterm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index f422fc9d401..e282856374d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10988,8 +10988,15 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, if (follow_tooltip) { +#if defined HAVE_XRANDR || defined USE_GTK x_dnd_monitors - = Fx_display_monitor_attributes_list (frame); + = FRAME_DISPLAY_INFO (f)->last_monitor_attributes_list; + + if (NILP (x_dnd_monitors)) +#endif + x_dnd_monitors + = Fx_display_monitor_attributes_list (frame); + record_unwind_protect_void (x_clear_dnd_monitors); } -- 2.39.2