From 2f513c64bc855b2953425fee102e4999543b0666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20R=C4=99bacz?= Date: Mon, 17 Mar 2025 14:57:43 +0100 Subject: [PATCH] CtrlCore: Fix issue with nested menubars on Wayland (#238) * CtrlCore: Fix issue with nested menubars on Wayland. * Comment less invasive --- uppsrc/CtrlCore/GtkCapture.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/uppsrc/CtrlCore/GtkCapture.cpp b/uppsrc/CtrlCore/GtkCapture.cpp index 24df7e089..a07cca91b 100644 --- a/uppsrc/CtrlCore/GtkCapture.cpp +++ b/uppsrc/CtrlCore/GtkCapture.cpp @@ -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 \ No newline at end of file +#endif