summaryrefslogtreecommitdiff
path: root/src/managers/XWaylandManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/XWaylandManager.cpp')
-rw-r--r--src/managers/XWaylandManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp
index 460e9ecd..38afe4ac 100644
--- a/src/managers/XWaylandManager.cpp
+++ b/src/managers/XWaylandManager.cpp
@@ -1,5 +1,6 @@
#include "XWaylandManager.hpp"
#include "../Compositor.hpp"
+#include "../desktop/state/FocusState.hpp"
#include "../events/Events.hpp"
#include "../config/ConfigValue.hpp"
#include "../helpers/Monitor.hpp"
@@ -69,8 +70,8 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) {
pWindow->m_xdgSurface->m_toplevel->setActive(activate);
if (activate) {
- g_pCompositor->m_lastFocus = getWindowSurface(pWindow);
- g_pCompositor->m_lastWindow = pWindow;
+ Desktop::focusState()->surface() = getWindowSurface(pWindow);
+ Desktop::focusState()->window() = pWindow;
}
if (!pWindow->m_pinned)