Re: [PATCH resend 1/2] user32: Fix WM_NCPAINT for windows crossing screen boarders and add tests
Fabian Maurer <dark.shadow4(a)web.de> writes:
@@ -662,7 +662,17 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags ) if (type == SIMPLEREGION) { RECT window; + LONG screenx = GetSystemMetrics(SM_CXSCREEN); + LONG screeny = GetSystemMetrics(SM_CYSCREEN); + GetWindowRect( hwnd, &window ); + + /* Clamp the window region to screen bounds */ + if(window.right > screenx) window.right = screenx; + if(window.bottom > screeny) window.bottom = screeny; + if(window.left < 0) window.left = 0; + if(window.top < 0) window.top = 0;
This won't be correct for multi-monitor setups. That sort of thing should probably be handled on the server side. -- Alexandre Julliard julliard(a)winehq.org
This won't be correct for multi-monitor setups. That sort of thing should probably be handled on the server side.
You're right, we should take care of that, too. Sadly, I don't have a multi monitor setup to run tests with. An idea how to still work on this? Regards, Fabian Maurer
participants (2)
-
Alexandre Julliard -
Fabian Maurer