+2001-10-17 Andrew Innes <andrewi@gnu.org>
+
+ * w32term.c (w32_read_socket): Determine clipping rectangle for
+ the entire frame, including areas covered by scrollbars and the
+ menubar. This avoids internal arguments about whether a frame is
+ fully obscured or not.
+
2001-10-17 Gerd Moellmann <gerd@gnu.org>
* xdisp.c (try_window_id): Undo last change. Give up if
if (FRAME_W32_P (f) && f->async_visible)
{
RECT clipbox;
- HDC hdc = get_frame_dc (f);
+ HDC hdc;
+
+ enter_crit ();
+ /* Query clipping rectangle for the entire window area
+ (GetWindowDC), not just the client portion (GetDC).
+ Otherwise, the scrollbars and menubar aren't counted as
+ part of the visible area of the frame, and we may think
+ the frame is obscured when really a scrollbar is still
+ visible and gets WM_PAINT messages above. */
+ hdc = GetWindowDC (FRAME_W32_WINDOW (f));
GetClipBox (hdc, &clipbox);
- release_frame_dc (f, hdc);
+ ReleaseDC (FRAME_W32_WINDOW (f), hdc);
+ leave_crit ();
if (clipbox.right == clipbox.left
|| clipbox.bottom == clipbox.top)