mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:49:47 +01:00
internal: don't sanity check workspaces on internal ws calls
This commit is contained in:
parent
6131e0bef7
commit
260ef788f5
2 changed files with 3 additions and 6 deletions
|
@ -1888,12 +1888,8 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||||
|
|
||||||
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing %d", nextWorkspaceOnMonitorID);
|
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing %d", nextWorkspaceOnMonitorID);
|
||||||
|
|
||||||
pWorkspace->m_bIndestructible = true; // so that changeworkspace doesn't yeet it if it's empty
|
|
||||||
|
|
||||||
g_pKeybindManager->focusMonitor(std::to_string(POLDMON->ID));
|
g_pKeybindManager->focusMonitor(std::to_string(POLDMON->ID));
|
||||||
g_pKeybindManager->changeworkspace(std::to_string(nextWorkspaceOnMonitorID));
|
g_pKeybindManager->changeworkspace("[internal]" + std::to_string(nextWorkspaceOnMonitorID));
|
||||||
|
|
||||||
pWorkspace->m_bIndestructible = false;
|
|
||||||
|
|
||||||
// move the workspace
|
// move the workspace
|
||||||
|
|
||||||
|
|
|
@ -961,6 +961,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
g_pCompositor->warpCursorTo(PMONITOR->vecPosition + PMONITOR->vecSize / 2.f);
|
g_pCompositor->warpCursorTo(PMONITOR->vecPosition + PMONITOR->vecSize / 2.f);
|
||||||
|
|
||||||
// Destroy old workspace if it is empty
|
// Destroy old workspace if it is empty
|
||||||
|
if (!internal)
|
||||||
g_pCompositor->sanityCheckWorkspaces();
|
g_pCompositor->sanityCheckWorkspaces();
|
||||||
|
|
||||||
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
|
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
|
||||||
|
|
Loading…
Reference in a new issue