Skip to content

Commit

Permalink
Merge pull request #49 from zeroxoneafour/local
Browse files Browse the repository at this point in the history
improved quick tile
  • Loading branch information
zeroxoneafour committed Jun 30, 2023
2 parents 19de531 + a11c9c1 commit 9b7eb54
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = polonium
VERSION = 0.5.1
VERSION = 0.5.2

PKGFILE = $(NAME).kwinscript
PKGDIR = pkg
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Refactored some stuff to use more per-window signals instead of global kwin ones
* Basic support for quick tile shortcuts and quick tiling
* Windows return to roughly where they were previously when tiling and retiling
* Improved support for quick tile shortcuts

### 0.5.1
* Added an optional direction parameter to `TilingEngine.putClientInTile` and most descending classes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polonium",
"version": "0.5.1",
"version": "0.5.2",
"description": "A tiling window manager for KWin",
"main": "src/index.ts",
"private": true,
Expand Down
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,13 @@ export function clientGeometryChange(this: any, client: KWin.AbstractClient, _ol
export function clientQuickTiled(this: any, client: KWin.AbstractClient): void {
// if the client is removed from a tile or put into a generated tile, this triggers so make it not trigger
if (client.tile == null || client.tile.generated || buildingLayout) return;
printDebug(client.tile.generated + "", true);
// get the root tile so we can insert into it if all else goes wrong
let rootTile = client.tile;
while (rootTile.parent != null) {
rootTile = rootTile.parent;
}
printDebug(client.resourceClass + " has been quick tiled", false);
const windowCenter = GeometryTools.rectCenter(client.frameGeometry);
const windowCenter = GeometryTools.rectCenter(client.tile.absoluteGeometry);
untileClient(client);
let tile = workspace.tilingForScreen(client.screen).bestTileForPosition(windowCenter.x, windowCenter.y);
if (tile == null) {
Expand Down

0 comments on commit 9b7eb54

Please sign in to comment.