mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 06:45:58 +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) {
|
for (auto& workspace : workspaces) {
|
||||||
if (workspace.getID() == ID) {
|
if (workspace.getID() == ID) {
|
||||||
|
// set workspaces dirty
|
||||||
|
setAllWorkspaceWindowsDirtyByID(activeWorkspaces[workspace.getMonitor()]);
|
||||||
|
setAllWorkspaceWindowsDirtyByID(ID);
|
||||||
|
|
||||||
activeWorkspaces[workspace.getMonitor()] = workspace.getID();
|
activeWorkspaces[workspace.getMonitor()] = workspace.getID();
|
||||||
LastWindow = -1;
|
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
|
// Update bar info
|
||||||
updateBarInfo();
|
updateBarInfo();
|
||||||
|
|
||||||
// mark new as dirty
|
|
||||||
setAllWorkspaceWindowsDirtyByID(activeWorkspaces[MONITOR->ID]);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue