summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-10-24 12:37:07 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-10-24 12:37:07 +0100
commitcf869d963687d26876f6e203a925cd6648380c4a (patch)
tree9eb35be0c8d9946e698d61f1afd4bcdd3054577d /src/events/Windows.cpp
parent077c1491a8590488256aa8cb207b3e4ed7f05f88 (diff)
allow nofocus + workspace silent
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index e2946d73..627da575 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -375,13 +375,14 @@ void Events::listener_mapWindow(void* owner, void* data) {
// move the window
const auto OLDWORKSPACE = PWINDOW->m_iWorkspaceID;
- if (g_pCompositor->m_pLastWindow == PWINDOW) {
- if (requestedWorkspace != "special")
- g_pKeybindManager->m_mDispatchers["movetoworkspacesilent"](requestedWorkspace);
- else
- g_pKeybindManager->m_mDispatchers["movetoworkspace"]("special");
+ std::stringstream stream;
+ stream << std::hex << (uintptr_t)PWINDOW;
+ std::string hexStr(stream.str());
+
+ if (requestedWorkspace != "special") {
+ g_pKeybindManager->m_mDispatchers["movetoworkspacesilent"](requestedWorkspace + ",address:0x" + hexStr);
} else {
- Debug::log(ERR, "Tried to set workspace silent rule to a nofocus window!");
+ g_pKeybindManager->m_mDispatchers["movetoworkspace"]("special,address:0x" + hexStr);
}
g_pCompositor->forceReportSizesToWindowsOnWorkspace(OLDWORKSPACE);