aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMightyPlaza <[email protected]>2024-03-28 14:15:34 +0000
committerGitHub <[email protected]>2024-03-28 14:15:34 +0000
commit187caf4187ffc16ec159b1a5b15657a18dfc05e1 (patch)
tree180fba94abb6278abba9b6aa5cc8957e3c6297aa
parent647d5a4ffc08ee654eb3ce951977789b1385a7f8 (diff)
downloadHyprland-187caf4187ffc16ec159b1a5b15657a18dfc05e1.tar.gz
Hyprland-187caf4187ffc16ec159b1a5b15657a18dfc05e1.zip
layers: don't change workspace on layer restore focus (#5308)
modified: src/events/Layers.cpp
-rw-r--r--src/events/Layers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp
index f4b52445..a1fef175 100644
--- a/src/events/Layers.cpp
+++ b/src/events/Layers.cpp
@@ -237,7 +237,7 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
&surfaceCoords, &pFoundLayerSurface);
- if (!foundSurface && g_pCompositor->m_pLastWindow) {
+ if (!foundSurface && g_pCompositor->m_pLastWindow && g_pCompositor->isWorkspaceVisible(g_pCompositor->m_pLastWindow->m_iWorkspaceID)) {
// if there isn't any, focus the last window
const auto PLASTWINDOW = g_pCompositor->m_pLastWindow;
g_pCompositor->focusWindow(nullptr);