emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 140d7cc9cb: Prevent invisible frames from acting as drag sources


From: Po Lu
Subject: master 140d7cc9cb: Prevent invisible frames from acting as drag sources
Date: Thu, 17 Mar 2022 05:43:36 -0400 (EDT)

branch: master
commit 140d7cc9cbb9da0a2494110105909b1cb8c92998
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 src/xterm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index 1b0b3ef793..6485374e2a 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");
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]