[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 1/2] user32: convert screen coordinates for send WM_SIZING
From: Alexandre Julliard <julliard () winehq ! org>
Date: 2010-04-29 15:35:24
Message-ID: m2wrvqgtkz.fsf () winehq ! org
[Download RAW message or body]
Konstantin Kondratyuk <kondratyuk@etersoft.ru> writes:
> @@ -2575,11 +2576,24 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
> if(!iconic && !DragFullWindows) draw_moving_frame( hdc, &sizingRect, thickframe );
> capturePoint = pt;
>
> + /* convert to screen coordinates */
> + if(parent)
> + {
> + POINT* p = (POINT*) &newRect;
> + ClientToScreen( parent, p );
> + ClientToScreen( parent, ++p );
> + converted = TRUE;
> + }
> +
> /* determine the hit location */
> if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT)
> wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT);
> SendMessageW( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect );
>
> + /* convert back to client coordinates id needed */
> + if(converted)
> + MapWindowPoints( 0, parent, (POINT*)&newRect, 2 );
> +
You should be using MapWindowPoints for the first case too, and there's
no need for that extra boolean variable.
--
Alexandre Julliard
julliard@winehq.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic