minor fix to silent ws rules

This commit is contained in:
vaxerski 2022-10-24 17:00:08 +01:00
parent cf869d9636
commit e0bc952c83

View file

@ -375,6 +375,14 @@ void Events::listener_mapWindow(void* owner, void* data) {
// move the window // move the window
const auto OLDWORKSPACE = PWINDOW->m_iWorkspaceID; 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");
}
} else {
// yes this is fucking weird no clue why this won't work for everyone
std::stringstream stream; std::stringstream stream;
stream << std::hex << (uintptr_t)PWINDOW; stream << std::hex << (uintptr_t)PWINDOW;
std::string hexStr(stream.str()); std::string hexStr(stream.str());
@ -384,6 +392,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
} else { } else {
g_pKeybindManager->m_mDispatchers["movetoworkspace"]("special,address:0x" + hexStr); g_pKeybindManager->m_mDispatchers["movetoworkspace"]("special,address:0x" + hexStr);
} }
}
g_pCompositor->forceReportSizesToWindowsOnWorkspace(OLDWORKSPACE); g_pCompositor->forceReportSizesToWindowsOnWorkspace(OLDWORKSPACE);
} }