Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
win32: fix crash caused by "isWindowFixedSize()"
Browse files Browse the repository at this point in the history
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
  • Loading branch information
wangwenx190 committed May 16, 2022
1 parent 45be647 commit ff1605e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/framelesshelper_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ FRAMELESSHELPER_STRING_CONSTANT(FindWindowW)
// Hit-testing event should not be considered as a mouse event.
const bool isMouseEvent = (((uMsg >= WM_MOUSEFIRST) && (uMsg <= WM_MOUSELAST)) ||
((uMsg >= WM_NCMOUSEMOVE) && (uMsg <= WM_NCXBUTTONDBLCLK)));
#if 0 // Need extra safe guard, otherwise will crash, but since it's not used, just comment them out.
// We only use this fallback title bar window to activate the snap layouts feature, if the parent
// 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.
Expand All @@ -128,6 +129,7 @@ FRAMELESSHELPER_STRING_CONSTANT(FindWindowW)
// For all other events just use the default handling.
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
}
#endif
const auto releaseButtons = [&data](const std::optional<SystemButtonType> exclude) -> void {
static constexpr const auto defaultButtonState = ButtonState::Unspecified;
if (!exclude.has_value() || (exclude.value() != SystemButtonType::WindowIcon)) {
Expand Down

0 comments on commit ff1605e

Please sign in to comment.