Correctly encode wParam for WM_SYSCOMMAND,SC_SIZE messages.
This commit is contained in:
parent
3ea0cb3e86
commit
5d35bc7428
|
@ -1901,7 +1901,8 @@ void X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
|
||||||
else /* SC_SIZE */
|
else /* SC_SIZE */
|
||||||
{
|
{
|
||||||
if (!thickframe) return;
|
if (!thickframe) return;
|
||||||
if ( hittest && hittest != HTSYSMENU ) hittest += 2;
|
if ( hittest && ((wParam & 0xfff0) != SC_MOUSEMENU) )
|
||||||
|
hittest += (HTLEFT - WMSZ_LEFT);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
set_movesize_capture( hwnd );
|
set_movesize_capture( hwnd );
|
||||||
|
|
|
@ -2071,8 +2071,15 @@ LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
case HTBOTTOM:
|
case HTBOTTOM:
|
||||||
case HTBOTTOMLEFT:
|
case HTBOTTOMLEFT:
|
||||||
case HTBOTTOMRIGHT:
|
case HTBOTTOMRIGHT:
|
||||||
/* make sure hittest fits into 0xf and doesn't overlap with HTSYSMENU */
|
/* Old comment:
|
||||||
SendMessageW( hwnd, WM_SYSCOMMAND, SC_SIZE + wParam - 2, lParam);
|
* "make sure hittest fits into 0xf and doesn't overlap with HTSYSMENU"
|
||||||
|
* This was previously done by setting wParam=SC_SIZE + wParam - 2
|
||||||
|
*/
|
||||||
|
/* But that is not what WinNT does. Instead it sends this. This
|
||||||
|
* is easy to differentiate from HTSYSMENU, because HTSYSMENU adds
|
||||||
|
* SC_MOUSEMENU into wParam.
|
||||||
|
*/
|
||||||
|
SendMessageW( hwnd, WM_SYSCOMMAND, SC_SIZE + wParam - (HTLEFT-WMSZ_LEFT), lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTBORDER:
|
case HTBORDER:
|
||||||
|
|
Loading…
Reference in New Issue