aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorAndrew Innes2001-10-17 17:19:27 +0000
committerAndrew Innes2001-10-17 17:19:27 +0000
commit66e5868ae110bf56f83967ce5145111daf17afd4 (patch)
tree94206fd5e3ce3bff99defcda0700ddd82d981bb6 /src/w32term.c
parent5889cc202a4c5050a5f93898d760e755b515c586 (diff)
downloademacs-66e5868ae110bf56f83967ce5145111daf17afd4.tar.gz
emacs-66e5868ae110bf56f83967ce5145111daf17afd4.zip
(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.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c14
1 files changed, 12 insertions, 2 deletions
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)
8713 if (FRAME_W32_P (f) && f->async_visible) 8713 if (FRAME_W32_P (f) && f->async_visible)
8714 { 8714 {
8715 RECT clipbox; 8715 RECT clipbox;
8716 HDC hdc = get_frame_dc (f); 8716 HDC hdc;
8717
8718 enter_crit ();
8719 /* Query clipping rectangle for the entire window area
8720 (GetWindowDC), not just the client portion (GetDC).
8721 Otherwise, the scrollbars and menubar aren't counted as
8722 part of the visible area of the frame, and we may think
8723 the frame is obscured when really a scrollbar is still
8724 visible and gets WM_PAINT messages above. */
8725 hdc = GetWindowDC (FRAME_W32_WINDOW (f));
8717 GetClipBox (hdc, &clipbox); 8726 GetClipBox (hdc, &clipbox);
8718 release_frame_dc (f, hdc); 8727 ReleaseDC (FRAME_W32_WINDOW (f), hdc);
8728 leave_crit ();
8719 8729
8720 if (clipbox.right == clipbox.left 8730 if (clipbox.right == clipbox.left
8721 || clipbox.bottom == clipbox.top) 8731 || clipbox.bottom == clipbox.top)