emacs-devel
[Top][All Lists]
Advanced

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

Re: Redisplay problems?


From: Stefan
Subject: Re: Redisplay problems?
Date: Thu, 20 Mar 2014 00:46:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Does the attached patch fix it?

The patch below seems to fix the problem (at least the test case).
Can someone confirm that it's a good idea?

> If so, we probably need a better way to avoid
>
>              If we where iconified, we should not set garbaged,
>              because that stops redrawing on Expose events.  This looks
>              bad if we are called from a recursive event loop
>              (x_dispatch_event), for example when a dialog is up.

I think my patch indeed fixes this problem by distinguishing between
f->garbaged (which presumably stops redrawing in Expose, tho I don't
offhand see where that happens) and frame_garbaged (which is needed to
get the next redisplay to be properly triggered and performed).

If it looks right, then we might reconsider the SET_FRAME_GARBAGED in
w32term.c in light of such a change, but that's even further away from
my expertise.


        Stefan


--- src/frame.h 2014-01-01 07:43:34 +0000
+++ src/frame.h 2014-03-20 04:30:42 +0000
@@ -946,6 +946,9 @@
       }                                                                \
   } while (false)
 
+/* False means there are no visible garbaged frames.  */
+extern bool frame_garbaged;
+
 /* Set visibility of frame F.
    We call redisplay_other_windows to make sure the frame gets redisplayed
    if some changes were applied to it while it wasn't visible (and hence
@@ -955,8 +958,13 @@
 SET_FRAME_VISIBLE (struct frame *f, int v)
 {
   eassert (0 <= v && v <= 2);
+  if (v)
+    {
   if (v == 1 && f->visible != 1)
     redisplay_other_windows ();
+      if (FRAME_GARBAGED_P (f))
+       frame_garbaged = true;
+    }
   f->visible = v;
 }
 
@@ -972,9 +980,6 @@
 extern Lisp_Object Qterminal;
 extern Lisp_Object Qnoelisp;
 
-/* True means there is at least one garbaged frame.  */
-extern bool frame_garbaged;
-
 extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern struct frame *decode_window_system_frame (Lisp_Object);
 extern struct frame *decode_live_frame (Lisp_Object);

--- src/xterm.c 2014-03-11 06:50:01 +0000
+++ src/xterm.c 2014-03-20 04:28:16 +0000
@@ -6142,14 +6142,6 @@
       if (f)
         {
          bool iconified = FRAME_ICONIFIED_P (f);
-          /* wait_reading_process_output will notice this and update
-             the frame's display structures.
-             If we where iconified, we should not set garbaged,
-             because that stops redrawing on Expose events.  This looks
-             bad if we are called from a recursive event loop
-             (x_dispatch_event), for example when a dialog is up.  */
-          if (!iconified)
-            SET_FRAME_GARBAGED (f);
 
           /* Check if fullscreen was specified before we where mapped the
              first time, i.e. from the command line.  */




reply via email to

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