From: Andrew Innes Date: Wed, 17 Oct 2001 17:19:27 +0000 (+0000) Subject: (w32_read_socket): Determine clipping rectangle for X-Git-Tag: ttn-vms-21-2-B4~19385 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66e5868ae110bf56f83967ce5145111daf17afd4;p=emacs.git (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. --- diff --git a/src/ChangeLog b/src/ChangeLog index cfb78753687..e27fbf47666 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-10-17 Andrew Innes + + * 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 * xdisp.c (try_window_id): Undo last change. Give up if diff --git a/src/w32term.c b/src/w32term.c index 8478f6c8b5e..0425ed44577 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -8713,9 +8713,19 @@ w32_read_socket (sd, bufp, numchars, expected) 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)