From 749cf798ce465634b616682e7c072f0a43a22906 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 1 Feb 2022 10:17:28 +0200 Subject: [PATCH] wayland: Fix spectacle not covering fullscreen windows The most recently activated window can be an overlay window that covers all screens. If its center is not at an output with the fullscreen window, then the fullscreen window's stack position won't be lowered. In order to fix that, this change makes isActiveFullscreen() use Toplevel::isOnOutput(), which uses geometry info, to check if both windows are on the same output. --- src/abstract_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index ff61825915..fbb0b038b8 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -2036,7 +2036,7 @@ bool AbstractClient::isActiveFullScreen() const // according to NETWM spec implementation notes suggests // "focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer. // we'll also take the screen into account - return ac && (ac == this || ac->output() != output()|| ac->allMainClients().contains(const_cast(this))); + return ac && (ac == this || !ac->isOnOutput(output()) || ac->allMainClients().contains(const_cast(this))); } #define BORDER(which) \