Module: wine Branch: master Commit: 8cfac3b218669edcef8b92ea8370b0579eb23ea9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=8cfac3b218669edcef8b92ea8...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Jul 5 12:48:13 2018 +0200
server: Don't clip update regions to the desktop window.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/msg.c | 4 ++-- server/window.c | 23 ++++++++--------------- 2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 0cfafe4..cb918fa 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -4760,7 +4760,7 @@ static void test_showwindow(void) flush_sequence(); ShowWindow(hwnd, SW_SHOWMAXIMIZED); ok_sequence(WmShowMaxPopupResizedSeq_todo, - "ShowWindow(SW_SHOWMAXIMIZED):invisible maximized and resized popup TODO", TRUE); + "ShowWindow(SW_SHOWMAXIMIZED):invisible maximized and resized popup TODO", FALSE); DestroyWindow(hwnd); flush_sequence();
@@ -5339,7 +5339,7 @@ static void test_messages(void) hwnd = CreateWindowExA(0, "TestWindowClass", "Test Popup", WS_POPUP | WS_VISIBLE, -10, -10, 10000, 10000, NULL, 0, 0, NULL ); ok (hwnd != 0, "Failed to create popup window\n"); - ok_sequence(WmShowPopupExtremeLocationSeq, "RedrawWindow:show_popup_extreme_location", TRUE); + ok_sequence(WmShowPopupExtremeLocationSeq, "RedrawWindow:show_popup_extreme_location", FALSE); DestroyWindow(hwnd);
diff --git a/server/window.c b/server/window.c index 0a32d46..322001d 100644 --- a/server/window.c +++ b/server/window.c @@ -1141,27 +1141,20 @@ struct window_class* get_window_class( user_handle_t window ) /* the returned rectangle is in window coordinates; return 0 if rectangle is empty */ static int get_window_visible_rect( struct window *win, rectangle_t *rect, int frame ) { - int offset_x = 0, offset_y = 0; - - if (!(win->style & WS_VISIBLE)) return 0; + int offset_x = win->window_rect.left, offset_y = win->window_rect.top;
*rect = frame ? win->window_rect : win->client_rect; - if (!is_desktop_window(win)) - { - offset_x = win->window_rect.left; - offset_y = win->window_rect.top; - }
- while (win->parent) + if (!(win->style & WS_VISIBLE)) return 0; + if (is_desktop_window( win )) return 1; + + while (!is_desktop_window( win->parent )) { win = win->parent; if (!(win->style & WS_VISIBLE) || win->style & WS_MINIMIZE) return 0; - if (!is_desktop_window(win)) - { - offset_x += win->client_rect.left; - offset_y += win->client_rect.top; - offset_rect( rect, win->client_rect.left, win->client_rect.top ); - } + offset_x += win->client_rect.left; + offset_y += win->client_rect.top; + offset_rect( rect, win->client_rect.left, win->client_rect.top ); if (!intersect_rect( rect, rect, &win->client_rect )) return 0; if (!intersect_rect( rect, rect, &win->window_rect )) return 0; }