mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 02:39:49 +01:00
fixed an issue with workspaces not being reloaded if on another monitor
This commit is contained in:
parent
ccc77d3d60
commit
c5eb8f2e1e
1 changed files with 13 additions and 4 deletions
|
@ -785,15 +785,24 @@ void CWindowManager::changeWorkspaceByID(int ID) {
|
|||
|
||||
for (auto& workspace : workspaces) {
|
||||
if (workspace.getID() == ID) {
|
||||
// set workspaces dirty
|
||||
setAllWorkspaceWindowsDirtyByID(activeWorkspaces[workspace.getMonitor()]);
|
||||
setAllWorkspaceWindowsDirtyByID(ID);
|
||||
|
||||
activeWorkspaces[workspace.getMonitor()] = workspace.getID();
|
||||
LastWindow = -1;
|
||||
|
||||
// set the focus to any window on that workspace
|
||||
for (auto& window : windows) {
|
||||
if (window.getWorkspaceID() == ID && window.getDrawable() > 0) {
|
||||
g_pWindowManager->setFocusedWindow(window.getDrawable());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update bar info
|
||||
updateBarInfo();
|
||||
|
||||
// mark new as dirty
|
||||
setAllWorkspaceWindowsDirtyByID(activeWorkspaces[MONITOR->ID]);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue