]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #14841 with invisible frames on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Fri, 26 Jul 2013 09:59:59 +0000 (12:59 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 26 Jul 2013 09:59:59 +0000 (12:59 +0300)
 src/w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
 being re-exposed only if it didn't ask to become visible.
 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
 was previously iconified.
 (x_iconify_frame): Mark the frame iconified.

src/ChangeLog
src/w32term.c

index 2b105e2405ed71d9e8b57dfa206e81eae64af5f0..59eb16a81e9051c656c27f58c068607db0f96a8a 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-26  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
+       being re-exposed only if it didn't ask to become visible.
+       <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
+       was previously iconified.  (Bug#14841)
+       (x_iconify_frame): Mark the frame iconified.
+
 2013-07-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix minor problems found by static checking.
index 2fe3fe07462abf23f84c4400bc82bb9e5426ea92..0b22fd178e4305ef93b9950da33dfbd7c08f42e7 100644 (file)
@@ -4360,8 +4360,9 @@ w32_read_socket (struct terminal *terminal,
                  SET_FRAME_VISIBLE (f, 1);
                  SET_FRAME_ICONIFIED (f, 0);
                  SET_FRAME_GARBAGED (f);
-                 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
-                            SDATA (f->name)));
+                 if (!f->output_data.w32->asked_for_visible)
+                   DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
+                              SDATA (f->name)));
 
                  /* WM_PAINT serves as MapNotify as well, so report
                     visibility changes properly.  */
@@ -4819,7 +4820,8 @@ w32_read_socket (struct terminal *terminal,
                  {
                    bool iconified = FRAME_ICONIFIED_P (f);
 
-                   SET_FRAME_VISIBLE (f, 1);
+                   if (iconified)
+                     SET_FRAME_VISIBLE (f, 1);
                    SET_FRAME_ICONIFIED (f, 0);
 
                    /* wait_reading_process_output will notice this
@@ -6129,6 +6131,9 @@ x_iconify_frame (struct frame *f)
   /* Simulate the user minimizing the frame.  */
   SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0);
 
+  SET_FRAME_VISIBLE (f, 0);
+  SET_FRAME_ICONIFIED (f, 1);
+
   unblock_input ();
 }