mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:45:58 +01:00
disallow workspace special windowrule
This commit is contained in:
parent
9742ac7596
commit
cc8b8f595f
2 changed files with 8 additions and 10 deletions
|
@ -122,6 +122,13 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
requestedWorkspace = WORKSPACERQ;
|
requestedWorkspace = WORKSPACERQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (requestedWorkspace == "special") {
|
||||||
|
requestedWorkspace = "";
|
||||||
|
workspaceSilent = false;
|
||||||
|
Debug::log(LOG, "windowrule=workspace special is not allowed!");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "Rule workspace matched by window %x, %s applied.", PWINDOW, r.szValue.c_str());
|
Debug::log(LOG, "Rule workspace matched by window %x, %s applied.", PWINDOW, r.szValue.c_str());
|
||||||
} else if (r.szRule.find("float") == 0) {
|
} else if (r.szRule.find("float") == 0) {
|
||||||
PWINDOW->m_bIsFloating = true;
|
PWINDOW->m_bIsFloating = true;
|
||||||
|
@ -170,10 +177,6 @@ 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) {
|
||||||
|
|
|
@ -891,12 +891,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID);
|
auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID);
|
||||||
|
|
||||||
if (!PSPECIALWORKSPACE) {
|
|
||||||
// ??? happens sometimes...?
|
|
||||||
PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(g_pCompositor->m_pLastMonitor->ID, "special", true)).get();
|
|
||||||
}
|
|
||||||
|
|
||||||
g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true;
|
g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true;
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID);
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue