From: Andrew Innes Date: Wed, 17 Oct 2001 17:22:37 +0000 (+0000) Subject: (w32_read_socket): Determine clipping rectangle for X-Git-Tag: emacs-21.1~44 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=238170a0184b9be88117520fd97851662570a5af;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 fba800fff72..30d8548780f 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 201a5331515..e8af4c53e3e 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -8719,9 +8719,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)