CtrlCore: Fix issue with nested menubars on Wayland (#238)

* CtrlCore: Fix issue with nested menubars on Wayland.

* Comment less invasive
This commit is contained in:
Zbigniew Rębacz 2025-03-17 14:57:43 +01:00 committed by GitHub
parent 916253ca4b
commit 2f513c64bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,8 +64,10 @@ void Ctrl::StartGrabPopup()
Ctrl *w = activePopup[0];
if(w && w->IsOpen()) {
ReleaseWndCapture0();
if(w->GrabMouse())
// NOTE: On Wayland GrabMouse() is broken and shouldn't be used.
if(IsWayland() || w->GrabMouse()) {
grabpopup = w;
}
}
}
}
@ -119,4 +121,4 @@ void Ctrl::CaptureSync()
};
#endif
#endif