From 3f660ee973c1937b36e2a462a2d99709fd99ce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 26 Jun 2024 00:58:18 +0200 Subject: [PATCH] window-list: Add `id` property to buttons A string ID that uniquely identifies a button will allow to serialize/deserialize the positions in the next commit. Part-of: --- extensions/window-list/extension.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 169b5518..b5be15e6 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -575,6 +575,10 @@ class WindowButton extends BaseButton { this._updateStyle(); } + get id() { + return `window:${this.metaWindow.get_id()}`; + } + _createTitleActor() { return new WindowTitle(this.metaWindow); } @@ -714,6 +718,10 @@ class AppButton extends BaseButton { this._updateStyle(); } + get id() { + return `app:${this.app.get_id()}`; + } + _windowEnteredOrLeftMonitor(metaDisplay, monitorIndex, metaWindow) { if (this._windowTracker.get_window_app(metaWindow) === this.app && monitorIndex === this._monitorIndex) {