From ea01d1963c50be635ca65aa264bd9104d9c9d91a Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Tue, 3 Dec 2024 10:38:47 -0300 Subject: [PATCH] Fix inactive window passes events to window below (fix #4561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to this fix, if all of the following conditions were met: + While a modal window (such as the Preferences dialog) was open. + 'Multiple window UI' was enabled. + A non-modal window (such as the Preview window) overlapped the modal window. + The non-modal window was selected, so this window is on top of the modal window. Caused mouse clicks and movements within the overlay area of ​​the non-modal window to be incorrectly passed to the window below, i.e. the modal window. Instead, it would be expected that no action would be taken. --- src/ui/manager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp index 16b41bec2..a0e3a529f 100644 --- a/src/ui/manager.cpp +++ b/src/ui/manager.cpp @@ -1392,6 +1392,7 @@ void Manager::_openWindow(Window* window, bool center) spec.minimizable(window->isDesktop()); spec.borderless(!window->isDesktop()); spec.transparent(window->isTransparent()); + spec.modal(window->isForeground() || window->isOnTop()); if (!window->isDesktop()) { spec.parent(parentDisplay->nativeWindow());