1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Fix crash in daemon when "C-x C-c" while a client frame shows tooltip

* src/frame.c (delete_frame): Ignore tooltip frames when looking
for other frames on the same terminal.  (Bug#76842)
This commit is contained in:
Eli Zaretskii 2025-03-08 11:31:22 +02:00
parent 1bb91adea5
commit d2445c8c23

View file

@ -2756,17 +2756,19 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
struct frame *f1 = XFRAME (frame1); struct frame *f1 = XFRAME (frame1);
/* Set frame_on_same_kboard to frame1 if it is on the same /* Set frame_on_same_kboard to frame1 if it is on the same
keyboard. Set frame_with_minibuf to frame1 if it also keyboard and is not a tooltip frame. Set
has a minibuffer. Leave the loop immediately if frame1 frame_with_minibuf to frame1 if it also has a minibuffer.
is also minibuffer-only. Leave the loop immediately if frame1 is also
minibuffer-only.
Emacs 26 does _not_ set frame_on_same_kboard here when it Emacs 26 did _not_ set frame_on_same_kboard here when it
finds a minibuffer-only frame and subsequently fails to found a minibuffer-only frame, and subsequently failed to
set default_minibuffer_frame below. Not a great deal and set default_minibuffer_frame below. Not a great deal and
never noticed since make_frame_without_minibuffer creates never noticed since make_frame_without_minibuffer created a
a new minibuffer frame in that case (which can be a minor new minibuffer frame in that case (which can be a minor
annoyance though). To consider for Emacs 26.3. */ annoyance though). */
if (kb == FRAME_KBOARD (f1)) if (!FRAME_TOOLTIP_P (f1)
&& kb == FRAME_KBOARD (f1))
{ {
frame_on_same_kboard = frame1; frame_on_same_kboard = frame1;
if (FRAME_HAS_MINIBUF_P (f1)) if (FRAME_HAS_MINIBUF_P (f1))