Compare commits

...

6 Commits

Author SHA1 Message Date
Florian Müllner
8ba229f0bb Bump version to 40.6
Update NEWS.
2022-02-15 20:41:34 +01:00
Florian Müllner
2e932eb688 window-list: Track window-created/unmanaged
Shell's WindowTracker switched to those signals instead of tracking
windows through MetaWorkspace's window-added/removed signals.

As ::window-created is only emitted after a window has been added to
its workspace, looking up its app on ::window-added now fails because
the window isn't tracked yet.

Address this by switching to the same signals for window tracking
(which is simpler anyway).

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/372
2022-01-21 02:21:51 +01:00
Florian Müllner
c08aff38d2 Bump version to 40.5
Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/201>
2021-12-11 14:11:42 +01:00
Florian Müllner
721d7b271a window-list: Fix OSK
The reveal animation moved from Main.layoutManager.keyboardBox to
the keyboard itself, so instead of applying an additional translation
for the bottom panel, we override the translation that would reveal
the keyboard (and thus prevent it from showing altogether).

Fix this by moving our translation to the keyboardBox instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/199>
(cherry picked from commit 02e5029eb6)
2021-12-11 14:10:17 +01:00
Sebastian Keller
5049ccdc99 native-window-placement: Remove custom styling
The window-picker padding was causing it to become smaller in the
overview resulting in a jump when opening it and caused sizing issues
with the workspace view in the app picker. However it is not needed
anymore with the new overview, so this can be fixed by simply removing
it.

The horizontal- and vertical-spacing properties got replaced with a
spacing property a while ago. However this is only used in
WorkspaceLayout::_createBestLayout() which gets overridden by this
extension which does not use it. So they can simply be removed.

The shell-caption-spacing property got removed when the window captions
got changed to always use the full length and has not been doing
anything since.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/301
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/309
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/189>
(cherry picked from commit 4a26cecd7d)
2021-12-11 14:10:17 +01:00
Neal Gompa
0857b041ee classic: Add X-GNOME-SessionRegisters
GDM has supported sessions registering with it for a few years now so
it can know when to shut down the greeter. Having the GNOME Classic
session declare that it will register itself allows GDM to avoid
executing a fallback codepath.

This has been supported with the regular GNOME session for a while,
and this session was likely forgotten about when it was added there.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/195>
(cherry picked from commit a79d2afb2d)
2021-12-11 14:10:17 +01:00
5 changed files with 40 additions and 57 deletions

16
NEWS
View File

@@ -1,3 +1,19 @@
40.6
====
* window-list: Update window tracking to avoid missing icons [Florian; #372]
Contributors:
Florian Müllner
40.5
====
* native-window-placement: Fix distorted layout in app grid [Sebastian; !189]
* window-list: Fix on-screen keyboard [Florian; !199]
* Misc. bug fixes [Neal; !195]
Contributors:
Neal Gompa, Sebastian Keller, Florian Müllner
40.4
====
* drive-menu: Fix indicator visibility [Florian; !176]

View File

@@ -5,3 +5,4 @@ Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session
TryExec=gnome-session
Type=Application
DesktopNames=GNOME-Classic;GNOME;
X-GDM-SessionRegisters=true

View File

@@ -1,9 +1 @@
.window-caption {
-shell-caption-spacing: 13px; /* current caption height is 26px => set it to half of it. TODO: better solution needed */
}
.window-picker {
-horizontal-spacing: 32px;
-vertical-spacing: 32px;
padding: 64px 32px;
}
/* This extensions requires no special styling */

View File

@@ -761,10 +761,9 @@ class WindowList extends St.Widget {
let workspaceManager = global.workspace_manager;
this._workspaceSignals = new Map();
this._nWorkspacesChangedId = workspaceManager.connect(
'notify::n-workspaces', this._onWorkspacesChanged.bind(this));
this._onWorkspacesChanged();
'notify::n-workspaces', this._updateWorkspaceIndicatorVisibility.bind(this));
this._updateWorkspaceIndicatorVisibility();
this._switchWorkspaceId = global.window_manager.connect(
'switch-workspace', this._checkGrouping.bind(this));
@@ -784,6 +783,10 @@ class WindowList extends St.Widget {
this._updateKeyboardAnchor();
});
this._windowSignals = new Map();
this._windowCreatedId = global.display.connect(
'window-created', (dsp, win) => this._addWindow(win));
this._dragBeginId = Main.xdndHandler.connect('drag-begin',
this._monitorDrag.bind(this));
this._dragEndId = Main.xdndHandler.connect('drag-end',
@@ -906,7 +909,7 @@ class WindowList extends St.Widget {
w2.metaWindow.get_stable_sequence();
});
for (let i = 0; i < windows.length; i++)
this._onWindowAdded(null, windows[i].metaWindow);
this._addWindow(windows[i].metaWindow);
} else {
let apps = this._appSystem.get_running().sort((a1, a2) => {
return _getAppStableSequence(a1) -
@@ -918,11 +921,8 @@ class WindowList extends St.Widget {
}
_updateKeyboardAnchor() {
if (!Main.keyboard.keyboardActor)
return;
let translationY = Main.overview.visible ? 0 : this.height;
Main.keyboard.keyboardActor.translation_y = -translationY;
const translationY = Main.overview.visible ? 0 : this.height;
Main.layoutManager.keyboardBox.translation_y = -translationY;
}
_onAppStateChanged(appSys, app) {
@@ -949,7 +949,7 @@ class WindowList extends St.Widget {
child.destroy();
}
_onWindowAdded(ws, win) {
_addWindow(win) {
if (!this._grouped)
this._checkGrouping();
@@ -960,21 +960,26 @@ class WindowList extends St.Widget {
if (children.find(c => c.metaWindow === win))
return;
this._windowSignals.set(
win, win.connect('unmanaged', () => this._removeWindow(win)));
let button = new WindowButton(win, this._perMonitor, this._monitor.index);
this._settings.bind('display-all-workspaces',
button, 'ignore-workspace', Gio.SettingsBindFlags.GET);
this._windowList.add_child(button);
}
_onWindowRemoved(ws, win) {
_removeWindow(win) {
if (this._grouped)
this._checkGrouping();
if (this._grouped)
return;
if (win.get_compositor_private())
return; // not actually removed, just moved to another workspace
const id = this._windowSignals.get(win);
if (id)
win.disconnect(id);
this._windowSignals.delete(id);
let children = this._windowList.get_children();
let child = children.find(c => c.metaWindow === win);
@@ -982,39 +987,6 @@ class WindowList extends St.Widget {
child.destroy();
}
_onWorkspacesChanged() {
let workspaceManager = global.workspace_manager;
let numWorkspaces = workspaceManager.n_workspaces;
for (let i = 0; i < numWorkspaces; i++) {
let workspace = workspaceManager.get_workspace_by_index(i);
if (this._workspaceSignals.has(workspace))
continue;
let signals = { windowAddedId: 0, windowRemovedId: 0 };
signals._windowAddedId = workspace.connect_after(
'window-added', this._onWindowAdded.bind(this));
signals._windowRemovedId = workspace.connect(
'window-removed', this._onWindowRemoved.bind(this));
this._workspaceSignals.set(workspace, signals);
}
this._updateWorkspaceIndicatorVisibility();
}
_disconnectWorkspaceSignals() {
let workspaceManager = global.workspace_manager;
let numWorkspaces = workspaceManager.n_workspaces;
for (let i = 0; i < numWorkspaces; i++) {
let workspace = workspaceManager.get_workspace_by_index(i);
let signals = this._workspaceSignals.get(workspace);
this._workspaceSignals.delete(workspace);
workspace.disconnect(signals._windowAddedId);
workspace.disconnect(signals._windowRemovedId);
}
}
_monitorDrag() {
DND.addDragMonitor(this._dragMonitor);
}
@@ -1078,18 +1050,20 @@ class WindowList extends St.Widget {
Main.keyboard._bottomDragAction.disconnect(this._keyboardVisiblechangedId);
this._keyboardVisiblechangedId = 0;
this._disconnectWorkspaceSignals();
global.workspace_manager.disconnect(this._nWorkspacesChangedId);
this._nWorkspacesChangedId = 0;
global.window_manager.disconnect(this._switchWorkspaceId);
this._switchWorkspaceId = 0;
this._windowSignals.forEach((id, win) => win.disconnect(id));
this._windowSignals.clear();
Main.overview.disconnect(this._overviewShowingId);
Main.overview.disconnect(this._overviewHidingId);
global.display.disconnect(this._fullscreenChangedId);
global.display.disconnect(this._windowCreatedId);
this._stopMonitoringDrag();
Main.xdndHandler.disconnect(this._dragBeginId);

View File

@@ -1,5 +1,5 @@
project('gnome-shell-extensions',
version: '40.4',
version: '40.6',
meson_version: '>= 0.44.0',
license: 'GPL2+'
)