Mercurial > emacs
changeset 40005:8bde67004473
(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.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Wed, 17 Oct 2001 17:18:23 +0000 |
parents | 0110d7aabac2 |
children | 53a414f28f58 |
files | src/w32term.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32term.c Wed Oct 17 15:38:45 2001 +0000 +++ b/src/w32term.c Wed Oct 17 17:18:23 2001 +0000 @@ -8713,9 +8713,19 @@ 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)