mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-18 11:29:49 +01:00
keybinds: fix tryMoveFocusToMonitor with special
This commit is contained in:
parent
1e3571eb5b
commit
a7cfbdb854
1 changed files with 7 additions and 5 deletions
|
@ -186,13 +186,15 @@ bool CKeybindManager::tryMoveFocusToMonitor(CMonitor* monitor) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
||||||
const auto PNEWWORKSPACE = g_pCompositor->getWorkspaceByID(monitor->activeWorkspace);
|
const auto PNEWMAINWORKSPACE = g_pCompositor->getWorkspaceByID(monitor->activeWorkspace);
|
||||||
|
|
||||||
g_pCompositor->setActiveMonitor(monitor);
|
g_pCompositor->setActiveMonitor(monitor);
|
||||||
g_pCompositor->deactivateAllWLRWorkspaces(PNEWWORKSPACE->m_pWlrHandle);
|
g_pCompositor->deactivateAllWLRWorkspaces(PNEWMAINWORKSPACE->m_pWlrHandle);
|
||||||
PNEWWORKSPACE->setActive(true);
|
PNEWMAINWORKSPACE->setActive(true);
|
||||||
PNEWWORKSPACE->rememberPrevWorkspace(PWORKSPACE);
|
PNEWMAINWORKSPACE->rememberPrevWorkspace(PWORKSPACE);
|
||||||
|
|
||||||
|
const auto PNEWWORKSPACE = monitor->specialWorkspaceID != 0 ? g_pCompositor->getWorkspaceByID(monitor->specialWorkspaceID) : PNEWMAINWORKSPACE;
|
||||||
|
|
||||||
const auto PNEWWINDOW = PNEWWORKSPACE->getLastFocusedWindow();
|
const auto PNEWWINDOW = PNEWWORKSPACE->getLastFocusedWindow();
|
||||||
if (PNEWWINDOW) {
|
if (PNEWWINDOW) {
|
||||||
|
|
Loading…
Reference in a new issue