[PATCH resend 1/2] user32: Fix WM_NCPAINT for windows crossing screen boarders and add tests
Alexandre Julliard
julliard at winehq.org
Mon Jan 30 06:03:42 CST 2017
Fabian Maurer <dark.shadow4 at 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 at winehq.org
More information about the wine-devel
mailing list