[gnome-shell-extensions/gnome-3-38] auto-move-windows: Exclude sticky windows from empty-check
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/gnome-3-38] auto-move-windows: Exclude sticky windows from empty-check
- Date: Wed, 2 Dec 2020 23:15:47 +0000 (UTC)
commit 3b22582752adede2d451f57d7e467184490f44e5
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Nov 5 22:09:30 2020 +0100
auto-move-windows: Exclude sticky windows from empty-check
We modify gnome-shell's workspace tracker to only remove empty
workspaces from the end. However we currently don't take into
account that sticky windows appear on all workspaces, so those
are preventing any workspace from getting removed at the moment.
Exclude them when determining whether a workspace is empty to
get the expected behavior.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/135
(cherry picked from commit 61cf679b8c6c86b62bff1d9e2489320b8a04fa4d)
extensions/auto-move-windows/extension.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index d99244c..b9bc3a0 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -116,10 +116,12 @@ function myCheckWorkspaces() {
let keepAliveWorkspaces = [];
let foundNonEmpty = false;
for (let i = this._workspaces.length - 1; i >= 0; i--) {
- if (!foundNonEmpty)
- foundNonEmpty = this._workspaces[i].list_windows().length > 0;
- else if (!this._workspaces[i]._keepAliveId)
+ if (!foundNonEmpty) {
+ foundNonEmpty = this._workspaces[i].list_windows().some(
+ w => !w.is_on_all_workspaces());
+ } else if (!this._workspaces[i]._keepAliveId) {
keepAliveWorkspaces.push(this._workspaces[i]);
+ }
}
// make sure the original method only removes empty workspaces at the end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]