emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112044: Fix bug #13953 with spontane


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112044: Fix bug #13953 with spontaneous frame resizes on MS-Windows.
Date: Thu, 14 Mar 2013 19:37:51 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112044
fixes bug: http://debbugs.gnu.org/13953
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2013-03-14 19:37:51 +0200
message:
  Fix bug #13953 with spontaneous frame resizes on MS-Windows.
  
   src/w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
   and incorrect code.  Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
   and WM_ACTIVATEAPP.
   (w32fullscreen_hook): If the frame is visible, reset
   f->want_fullscreen flag after changing the frame size.  If the
   frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
modified:
  src/ChangeLog
  src/w32term.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-03-13 19:28:50 +0000
+++ b/src/ChangeLog     2013-03-14 17:37:51 +0000
@@ -1,3 +1,13 @@
+2013-03-14  Eli Zaretskii  <address@hidden>
+
+       * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
+       and incorrect code.  Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
+       and WM_ACTIVATEAPP.
+       (w32fullscreen_hook): If the frame is visible, reset
+       f->want_fullscreen flag after changing the frame size.  If the
+       frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
+       (Bug#13953)
+
 2013-03-13  Daniel Colascione  <address@hidden>
 
        * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2013-03-13 17:31:06 +0000
+++ b/src/w32term.c     2013-03-14 17:37:51 +0000
@@ -4705,26 +4705,20 @@
          }
 
        case WM_WINDOWPOSCHANGED:
-         f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
-         if (f)
-           {
-             if (f->want_fullscreen & FULLSCREEN_WAIT)
-               f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH);
-           }
-         check_visibility = 1;
-         break;
-
        case WM_ACTIVATE:
        case WM_ACTIVATEAPP:
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
          if (f)
            {
-             /* If we are being activated, run the full-screen hook
-                function, to actually install the required size in
-                effect.  This is because when the hook is run from
-                x_set_fullscreen, the frame might not yet be visible,
-                if that call is a result of make-frame.  */
-             if (msg.msg.wParam)
+             /* Run the full-screen hook function also when we are
+                being activated, to actually install the required
+                size in effect, if the WAIT flag is set.  This is
+                because when the hook is run from x_set_fullscreen,
+                the frame might not yet be visible, if that call is a
+                result of make-frame, and in that case the hook just
+                sets the WAIT flag.  */
+             if ((msg.msg.message == WM_WINDOWPOSCHANGED || msg.msg.wParam)
+                 && (f->want_fullscreen & FULLSCREEN_WAIT))
                w32fullscreen_hook (f);
              x_check_fullscreen (f);
            }
@@ -5739,8 +5733,11 @@
          x_set_window_size (f, 1, width, height);
          do_pending_window_change (0);
        }
+      f->want_fullscreen = FULLSCREEN_NONE;
       unblock_input ();
     }
+  else
+    f->want_fullscreen |= FULLSCREEN_WAIT;
 }
 
 /* Call this to change the size of frame F's x-window.


reply via email to

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