win32: fix another issue related to hit test

This issue was hidden due to it's actually not executed.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-05-15 15:51:09 +08:00
parent c2c6ef1976
commit 45be647baf
1 changed files with 3 additions and 3 deletions

View File

@ -113,10 +113,10 @@ FRAMELESSHELPER_STRING_CONSTANT(FindWindowW)
// window is not resizable, the snap layouts feature should also be disabled at the same time, // window is not resizable, the snap layouts feature should also be disabled at the same time,
// hence forward everything to the parent window, we don't need to handle anything here. // hence forward everything to the parent window, we don't need to handle anything here.
if (data.params.isWindowFixedSize()) { if (data.params.isWindowFixedSize()) {
// Ask the parent window for the hit test result and returns it here, to // Let the mouse event pass through our fallback title bar window to the root window
// let our homemade title bar still draggable. // under it, to ensure our homemade title bar keep functional.
if (uMsg == WM_NCHITTEST) { if (uMsg == WM_NCHITTEST) {
return SendMessageW(parentWindowHandle, uMsg, wParam, lParam); return HTTRANSPARENT;
} }
// Forward all mouse events to the parent window to let the controls inside // Forward all mouse events to the parent window to let the controls inside
// our homemade title bar still continue to work normally. But ignore these // our homemade title bar still continue to work normally. But ignore these