From: Po Lu Date: Thu, 17 Mar 2022 09:41:41 +0000 (+0800) Subject: Prevent invisible frames from acting as drag sources X-Git-Tag: emacs-29.0.90~1931^2~1074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=140d7cc9cbb9da0a2494110105909b1cb8c92998;p=emacs.git Prevent invisible frames from acting as drag sources * src/xterm.c (x_dnd_begin_drag_and_drop): Error out if f is invisible. It makes no sense for an invisible frame to be a drag source, so the function just hangs. --- diff --git a/src/xterm.c b/src/xterm.c index 1b0b3ef793f..6485374e2ae 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1093,6 +1093,9 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, char *atom_name; Lisp_Object action, ltimestamp; + if (!FRAME_VISIBLE_P (f)) + error ("Frame is invisible"); + if (x_dnd_in_progress) error ("A drag-and-drop session is already in progress");