fix issue with special workspace rules

This commit is contained in:
vaxerski 2022-07-04 12:03:09 +02:00
parent fc3957d538
commit 853a33888b

View file

@ -170,6 +170,10 @@ void Events::listener_mapWindow(void* owner, void* data) {
} }
requestedWorkspace = requestedWorkspace.substr(0, requestedWorkspace.find_first_of(' ')); requestedWorkspace = requestedWorkspace.substr(0, requestedWorkspace.find_first_of(' '));
if (requestedWorkspace == "special") {
workspaceSilent = true;
}
} }
if (!workspaceSilent) { if (!workspaceSilent) {
@ -254,7 +258,10 @@ void Events::listener_mapWindow(void* owner, void* data) {
if (workspaceSilent) { if (workspaceSilent) {
// move the window // move the window
if (g_pCompositor->m_pLastWindow == PWINDOW) { if (g_pCompositor->m_pLastWindow == PWINDOW) {
g_pKeybindManager->m_mDispatchers["movetoworkspacesilent"](requestedWorkspace); if (requestedWorkspace != "special")
g_pKeybindManager->m_mDispatchers["movetoworkspacesilent"](requestedWorkspace);
else
g_pKeybindManager->m_mDispatchers["movetoworkspace"]("special");
} else { } else {
Debug::log(ERR, "Tried to set workspace silent rule to a nofocus window!"); Debug::log(ERR, "Tried to set workspace silent rule to a nofocus window!");
} }