Skip to content

Commit

Permalink
Merge pull request #181 from Raven-002/Opening-a-new-window-while-in-…
Browse files Browse the repository at this point in the history
…full-screen-exists-fullscreen

Add quit full screen for output
  • Loading branch information
zeroxoneafour authored Jul 9, 2024
2 parents 844db30 + 7c9dc76 commit f17754a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/actions/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class WorkspaceActions {
}
this.logger.debug("Window", window.resourceClass, "added");
this.ctrl.driverManager.addWindow(window);
this.ctrl.driverManager.quitFullScreen(window.output);
this.ctrl.driverManager.rebuildLayout();
}

Expand Down
13 changes: 13 additions & 0 deletions src/driver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,17 @@ export class DriverManager {
this.ctrl.dbusManager.removeSettings(desktop.toString());
this.rebuildLayout(desktop.output);
}

quitFullScreen(output: Output): void {
this.ctrl.workspace.windows.forEach(window => {
if (window.output == output && window.fullScreen) {
window.fullScreen = false;
}
// not sure how to check for maximized so i just disable
// it for all in the same output.
if (window.output == output) {
window.setMaximize(false, false);
}
});
}
}

0 comments on commit f17754a

Please sign in to comment.