Skip to content

Commit

Permalink
changes changes etc
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroxoneafour committed Apr 19, 2024
1 parent 83084c9 commit 59f2324
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The descendant of [autotile](https://github.com/zeroxoneafour/kwin-autotile).

## features

- Works in Wayland Plasma 6.0 and up (needs KWin 6.0.3 installed to drag tiles with the mouse)
- Works in Wayland Plasma 6.0.4 and up
- Custom moddable tiling engine backend
- Edit tile sizes with the integrated KWin GUI
- Move and tile windows with your mouse and keyboard
Expand Down
12 changes: 9 additions & 3 deletions src/controller/actions/windowhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ export class WindowHooks {
} else if (
!this.window.fullScreen &&
this.extensions.wasTiled &&
!this.extensions.isTiled
!this.extensions.isTiled &&
!this.window.minimized &&
!(this.extensions.maximized && this.extensions.isSingleMaximized)
) {
this.putWindowInBestTile();
}
Expand All @@ -225,7 +227,9 @@ export class WindowHooks {
} else if (
!this.window.minimized &&
this.extensions.wasTiled &&
!this.extensions.isTiled
!this.extensions.isTiled &&
!this.window.fullScreen &&
!(this.extensions.maximized && this.extensions.isSingleMaximized)
) {
this.putWindowInBestTile();
}
Expand Down Expand Up @@ -257,7 +261,9 @@ export class WindowHooks {
} else if (
!maximized &&
this.extensions.wasTiled &&
!this.extensions.isTiled
!this.extensions.isTiled &&
!this.window.fullScreen &&
!this.window.minimized
) {
this.putWindowInBestTile();
}
Expand Down
14 changes: 11 additions & 3 deletions src/driver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,27 @@ export class DriverManager {
);
// make registered "untiled" clients appear untiled
for (const window of driver.untiledWindows) {
const extensions = this.ctrl.windowExtensions.get(window)!;
// shouldve already done this if isTiled is already false?
if (!extensions.isTiled) {
continue;
}
// sometimes effects on untiled windows dont properly apply
if (window.fullScreen) {
let fullscreen: boolean = false;
if (window.fullScreen && extensions.isTiled) {
window.fullScreen = false;
window.fullScreen = true;
fullscreen = true;
}
// maxmimized
const extensions = this.ctrl.windowExtensions.get(window)!;
const wasSingleMaximized = extensions.isSingleMaximized;
this.applyUntiled(window);
window.tile = null;
if (wasSingleMaximized) {
window.setMaximize(false, false);
}
if (fullscreen) {
window.fullScreen = true;
}
}
}
this.buildingLayout = false;
Expand Down

0 comments on commit 59f2324

Please sign in to comment.