From 69b8568ccff1cc225c5ad4b341c8a09bdf9f8654 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sat, 6 Aug 2022 20:57:38 +0200 Subject: better foreign toplevel protocol obedience --- src/managers/KeybindManager.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 00cfad3f..bc6bab77 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -408,14 +408,7 @@ void CKeybindManager::spawn(std::string args) { } void CKeybindManager::killActive(std::string args) { - if (g_pCompositor->m_pLastWindow && g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow)) { - g_pXWaylandManager->sendCloseWindow(g_pCompositor->m_pLastWindow); - g_pCompositor->m_pLastFocus = nullptr; - g_pCompositor->m_pLastWindow = nullptr; - g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // post an activewindow event to empty, as we are currently unfocused - } - - g_pCompositor->focusWindow(g_pCompositor->windowFromCursor()); + g_pCompositor->closeWindow(g_pCompositor->m_pLastWindow); } void CKeybindManager::clearKeybinds() { @@ -671,6 +664,8 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { } g_pInputManager->refocus(); + + PWINDOW->updateToplevel(); } void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { -- cgit v1.2.3