workspaces: fixup workspaces not activating on workspace switch
This commit is contained in:
parent
3f2a18a435
commit
727160f0a4
2 changed files with 15 additions and 3 deletions
|
|
@ -477,9 +477,17 @@ float CMonitor::getDefaultScale() {
|
|||
}
|
||||
|
||||
void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) {
|
||||
if (!pWorkspace || pWorkspace->m_iID == activeWorkspace)
|
||||
if (!pWorkspace)
|
||||
return;
|
||||
|
||||
if (pWorkspace->m_iID == activeWorkspace) {
|
||||
// in some cases (e.g. workspace from one monitor to another)
|
||||
// we need to send this
|
||||
g_pCompositor->deactivateAllWLRWorkspaces(pWorkspace->m_pWlrHandle);
|
||||
pWorkspace->setActive(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pWorkspace->m_bIsSpecialWorkspace) {
|
||||
Debug::log(ERR, "BUG THIS: Attempted to changeWorkspace to special!");
|
||||
return;
|
||||
|
|
@ -509,7 +517,7 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) {
|
|||
}
|
||||
|
||||
// set some flags and fire event
|
||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
||||
g_pCompositor->deactivateAllWLRWorkspaces(pWorkspace->m_pWlrHandle);
|
||||
pWorkspace->setActive(true);
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"workspace", pWorkspace->m_szName});
|
||||
EMIT_HOOK_EVENT("workspace", pWorkspace);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue