+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.
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. */
{
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
/* 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 ();
}