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 10:01:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> And of course, the frame's "garbaged" bit may not always be needed: if
> the frame was simply iconified+deiconified without any other change,
> there's no need to recompute matrices nor redraw anything, since it's
> pretty much the same as obscuring the frame with another and then
> exposing it again.

I suggest the patch below for w32term.c.  Guaranteed 100% untested, of
course,


        Stefan


=== modified file 'src/w32term.c'
--- src/w32term.c       2014-03-14 10:38:46 +0000
+++ src/w32term.c       2014-03-20 13:55:14 +0000
@@ -4184,8 +4184,8 @@
 
          if (f)
            {
-             if (msg.rect.right == msg.rect.left ||
-                 msg.rect.bottom == msg.rect.top)
+             if (msg.rect.right == msg.rect.left
+                 || msg.rect.bottom == msg.rect.top)
                {
                  /* We may get paint messages even though the client
                     area is clipped - these are not expose events. */
@@ -4199,7 +4199,6 @@
                  /* Definitely not obscured, so mark as visible.  */
                  SET_FRAME_VISIBLE (f, 1);
                  SET_FRAME_ICONIFIED (f, 0);
-                 SET_FRAME_GARBAGED (f);
                  if (!f->output_data.w32->asked_for_visible)
                    DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
                               SDATA (f->name)));
@@ -4444,8 +4443,9 @@
 #if 0 /* The below is an invalid comparison when CHECK_LISP_OBJECT_TYPE.
         But it was originally changed to this to fix a bug, so I have
         not removed it completely in case the bug is still there.  */
-          if (help_echo_string != previous_help_echo_string ||
-             (!NILP (help_echo_string) && !STRINGP (help_echo_string) && 
f->mouse_moved))
+          if (help_echo_string != previous_help_echo_string
+             || (!NILP (help_echo_string) && !STRINGP (help_echo_string)
+                 && f->mouse_moved))
 #else /* This is what xterm.c does.  */
            if (!NILP (help_echo_string)
                || !NILP (previous_help_echo_string))
@@ -4557,8 +4557,8 @@
 
        case WM_VSCROLL:
          {
-           struct scroll_bar *bar =
-             x_window_to_scroll_bar ((HWND)msg.msg.lParam);
+           struct scroll_bar *bar
+             = x_window_to_scroll_bar ((HWND)msg.msg.lParam);
 
            if (bar)
              w32_scroll_bar_handle_click (bar, &msg, &inev);
@@ -4645,8 +4645,9 @@
                    SET_FRAME_VISIBLE (f, 1);
                    SET_FRAME_ICONIFIED (f, 0);
 
-                   /* wait_reading_process_output will notice this
-                      and update the frame's display structures.  */
+                   /* FIXME: We should not need to set `garbaged' if the
+                      window was simply deiconified and it was previously
+                      maximized.  */
                    SET_FRAME_GARBAGED (f);
 
                    if (iconified)
@@ -4692,8 +4693,9 @@
                      SET_FRAME_VISIBLE (f, 1);
                    SET_FRAME_ICONIFIED (f, 0);
 
-                   /* wait_reading_process_output will notice this
-                      and update the frame's display structures.  */
+                   /* FIXME: We should not need to set `garbaged' if the
+                      window was simply deiconified and it had previously
+                      the same size.  */
                    SET_FRAME_GARBAGED (f);
 
                    if (iconified)
@@ -4990,7 +4992,6 @@
 
                if (obscured)
                  {
-                   SET_FRAME_GARBAGED (f);
                    DebPrint (("obscured frame %p (%s) found to be visible\n",
                               f, SDATA (f->name)));
 




reply via email to

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