From: Po Lu Date: Sun, 12 Jun 2022 02:17:19 +0000 (+0800) Subject: Use cached monitor info during DND if available X-Git-Tag: emacs-29.0.90~1910^2~64 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6aa8baaea1b872a9b770d680849b9b1b95eb2840;p=emacs.git 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. --- 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); }