From 2030767dd03518a1296376890ad03bbb85d3ffdb Mon Sep 17 00:00:00 2001 From: TheMachine02 Date: Tue, 8 Feb 2022 12:21:22 +0100 Subject: [PATCH] fix: float some utility windows on wayland By using transient propriety, most of utility windows are automatically made float --- src/kwinscript/driver/window.ts | 5 ++++- src/kwinscript/extern/kwin.d.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/kwinscript/driver/window.ts b/src/kwinscript/driver/window.ts index aaa47f91..2bc31e8b 100644 --- a/src/kwinscript/driver/window.ts +++ b/src/kwinscript/driver/window.ts @@ -129,7 +129,10 @@ export class DriverWindowImpl implements DriverWindow { this.client.modal || !this.client.resizeable || (this.config.floatUtility && - (this.client.dialog || this.client.splash || this.client.utility)) || + (this.client.dialog || + this.client.splash || + this.client.utility || + this.client.transient)) || this.config.floatingClass.indexOf(resourceClass) >= 0 || this.config.floatingClass.indexOf(resourceName) >= 0 || matchWords(this.client.caption, this.config.floatingTitle) >= 0 diff --git a/src/kwinscript/extern/kwin.d.ts b/src/kwinscript/extern/kwin.d.ts index ed8e0749..3d29b369 100644 --- a/src/kwinscript/extern/kwin.d.ts +++ b/src/kwinscript/extern/kwin.d.ts @@ -213,6 +213,12 @@ declare namespace KWin { */ readonly specialWindow: boolean; + /** + * Whether the windows is transient to an other windows, i.e. it is a sub window belonging to + * a main window + */ + readonly transient: boolean; + /** * The desktop this window is on. If the window is on all desktops the property has value -1. */