mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Detect HTHSCROLL/HTVSCROLL as HTCLIENT in WM_NCHITTEST message
In this way we fix a bug where (sometimes) the mouse is not detected as in the client area because it's over a system scrollbar.
This commit is contained in:
parent
6aca409d84
commit
81d30fb24d
@ -394,6 +394,19 @@ static LRESULT CALLBACK wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_NCHITTEST: {
|
||||
LRESULT result = ::CallWindowProc(base_wndproc, hwnd, msg, wparam, lparam);
|
||||
|
||||
// We ignore scrollbars so if the mouse is above them, we return
|
||||
// as it's in the client area. (Remember that we have scroll
|
||||
// bars are enabled and visible to receive trackpad messages
|
||||
// only.)
|
||||
if (result == HTHSCROLL || result == HTVSCROLL)
|
||||
result = HTCLIENT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
return ::CallWindowProc(base_wndproc, hwnd, msg, wparam, lparam);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user