emacs-diffs
[Top][All Lists]
Advanced

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

master 15315780ae3: Handle update of invisible tty frames (bug#75056)


From: Gerd Moellmann
Subject: master 15315780ae3: Handle update of invisible tty frames (bug#75056)
Date: Fri, 24 Jan 2025 00:25:23 -0500 (EST)

branch: master
commit 15315780ae36cc2af6e276165562dc793334c2f9
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Handle update of invisible tty frames (bug#75056)
    
    * src/dispnew.c (combine_updates_for_frame): Don't assume root frame is
    visible.
---
 src/dispnew.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/dispnew.c b/src/dispnew.c
index 9726bf70660..e4567f6970c 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3964,11 +3964,20 @@ combine_updates_for_frame (struct frame *f, bool 
inhibit_scrolling)
 {
 #ifndef HAVE_ANDROID
   struct frame *root = root_frame (f);
-  eassert (FRAME_VISIBLE_P (root));
+
+  /* Determine visible frames on the root frame, including the root
+     frame itself.  Note that there are cases, see bug#75056, where we
+     can be called for invisible frames. */
+  Lisp_Object z_order = frames_in_reverse_z_order (root, true);
+  if (NILP (z_order))
+    {
+      Lisp_Object root_frame;
+      XSETFRAME (root_frame, root);
+      z_order = Fcons (root_frame, Qnil);
+    }
 
   /* Process child frames in reverse z-order, topmost last.  For each
      child, copy what we need to the root's desired matrix.  */
-  Lisp_Object z_order = frames_in_reverse_z_order (root, true);
   struct frame *topmost_child = NULL;
   for (Lisp_Object tail = XCDR (z_order); CONSP (tail); tail = XCDR (tail))
     {



reply via email to

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