Fix title bar resize grabber on Windows (#13020)

Make sure the title control passes all mouse events to its parent
This commit is contained in:
Noisyfox
2026-03-30 19:18:56 +08:00
committed by GitHub
parent a475e35730
commit 239253ecb1
2 changed files with 17 additions and 0 deletions

View File

@@ -749,6 +749,18 @@ wxAuiToolBarItem* BBLTopbar::FindToolByCurrentPosition()
}
#ifdef __WIN32__
WXLRESULT CenteredTitle::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg) {
case WM_NCHITTEST: {
// Pass all mouse event to parent
return HTTRANSPARENT;
}
}
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
}
WXLRESULT BBLTopbar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg) {

View File

@@ -18,6 +18,11 @@ public:
wxSize DoGetBestSize() const override;
protected:
#ifdef __WIN32__
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) override;
#endif
private:
wxString m_title;
};