Skip to content

Commit

Permalink
Restor maximize on maximize
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Aug 12, 2019
1 parent c4f349b commit db3dbdf
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tilingManager/tilingLayouts/maximize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { St } = imports.gi;
const { St, Meta } = imports.gi;
const Tweener = imports.ui.tweener;
const Main = imports.ui.main;
const ExtensionUtils = imports.misc.extensionUtils;
Expand Down Expand Up @@ -34,25 +34,16 @@ var MaximizeLayout = class MaximizeLayout extends BaseTilingLayout {
}

onTileRegulars(windows) {
super.onTileRegulars(windows);
const workArea = this.getWorkspaceBounds();

windows.forEach(window => {
this.moveAndResizeMetaWindow(
window,
workArea.x,
workArea.y,
workArea.width,
workArea.height,
true,
true
);
if (
window !== this.windowFocused ||
!this.superWorkspace.isDisplayed()
) {
window.get_compositor_private().hide();
} else {
if (!window.grabbed && !window.maximized_horizontally) {
window.maximize(Meta.MaximizeFlags.BOTH);
}
window.get_compositor_private().show();
}
});
Expand Down

0 comments on commit db3dbdf

Please sign in to comment.