import gnome-shell-3.32.2-4.el8
This commit is contained in:
commit
e66f5a7305
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/gnome-shell-3.32.2.tar.xz
|
1
.gnome-shell.metadata
Normal file
1
.gnome-shell.metadata
Normal file
@ -0,0 +1 @@
|
||||
331e9cf71cd1d2a4e9238d87d216da4c6f3a400e SOURCES/gnome-shell-3.32.2.tar.xz
|
@ -0,0 +1,28 @@
|
||||
From 23755cc20f3c05b97f769e27553f2ab482d60137 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Wed, 20 May 2015 16:44:00 +0200
|
||||
Subject: [PATCH] app: Fall back to window title instead of WM_CLASS
|
||||
|
||||
It's a bad fallback as it's clearly window-specific (rather than
|
||||
app-specific), but it likely looks prettier when we fail to associate
|
||||
a .desktop file ...
|
||||
---
|
||||
src/shell-app.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shell-app.c b/src/shell-app.c
|
||||
index 10efa9135..7d40186c9 100644
|
||||
--- a/src/shell-app.c
|
||||
+++ b/src/shell-app.c
|
||||
@@ -259,7 +259,7 @@ shell_app_get_name (ShellApp *app)
|
||||
const char *name = NULL;
|
||||
|
||||
if (window)
|
||||
- name = meta_window_get_wm_class (window);
|
||||
+ name = meta_window_get_title (window);
|
||||
if (!name)
|
||||
name = C_("program", "Unknown");
|
||||
return name;
|
||||
--
|
||||
2.21.0
|
||||
|
111
SOURCES/0001-appDisplay-Show-full-app-name-on-hover.patch
Normal file
111
SOURCES/0001-appDisplay-Show-full-app-name-on-hover.patch
Normal file
@ -0,0 +1,111 @@
|
||||
From a1c35ebb8f29103035526e6f48eba4ff37551964 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 21 Jun 2018 18:03:31 +0200
|
||||
Subject: [PATCH] appDisplay: Show full app name on hover
|
||||
|
||||
---
|
||||
data/theme/gnome-shell-sass/_common.scss | 8 ++++
|
||||
js/ui/appDisplay.js | 48 ++++++++++++++++++++++++
|
||||
2 files changed, 56 insertions(+)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
|
||||
index 3b0d2bf04..293ea2ab9 100644
|
||||
--- a/data/theme/gnome-shell-sass/_common.scss
|
||||
+++ b/data/theme/gnome-shell-sass/_common.scss
|
||||
@@ -1411,6 +1411,14 @@ StScrollBar {
|
||||
|
||||
}
|
||||
|
||||
+ .app-well-hover-text {
|
||||
+ text-align: center;
|
||||
+ color: $osd_fg_color;
|
||||
+ background-color: $osd_bg_color;
|
||||
+ border-radius: 5px;
|
||||
+ padding: 3px;
|
||||
+ }
|
||||
+
|
||||
.app-well-app-running-dot { //running apps indicator
|
||||
width: 10px; height: 3px;
|
||||
background-color: $selected_bg_color;
|
||||
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
|
||||
index adaefa7dd..a07db6573 100644
|
||||
--- a/js/ui/appDisplay.js
|
||||
+++ b/js/ui/appDisplay.js
|
||||
@@ -1478,6 +1478,20 @@ var AppIcon = class AppIcon {
|
||||
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||
this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this));
|
||||
|
||||
+ this._hoverText = null;
|
||||
+ this._hoverTimeoutId = 0;
|
||||
+
|
||||
+ if (this.icon.label) {
|
||||
+ this._hoverText = new St.Label({ style_class: 'app-well-hover-text',
|
||||
+ text: this.icon.label.text,
|
||||
+ visible: false });
|
||||
+ this._hoverText.clutter_text.line_wrap = true;
|
||||
+ Main.layoutManager.addChrome(this._hoverText);
|
||||
+
|
||||
+ this.actor.connect('notify::hover', this._syncHoverText.bind(this));
|
||||
+ this.connect('sync-tooltip', this._syncHoverText.bind(this));
|
||||
+ }
|
||||
+
|
||||
this._menu = null;
|
||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||
|
||||
@@ -1509,12 +1523,39 @@ var AppIcon = class AppIcon {
|
||||
this.app.disconnect(this._stateChangedId);
|
||||
this._stateChangedId = 0;
|
||||
this._removeMenuTimeout();
|
||||
+ this._removeHoverTimeout();
|
||||
+ if (this._hoverText)
|
||||
+ this._hoverText.destroy();
|
||||
+ this._hoverText = null;
|
||||
}
|
||||
|
||||
_createIcon(iconSize) {
|
||||
return this.app.create_icon_texture(iconSize);
|
||||
}
|
||||
|
||||
+ _syncHoverText() {
|
||||
+ if (this.shouldShowTooltip()) {
|
||||
+ if (this._hoverTimeoutId)
|
||||
+ return;
|
||||
+
|
||||
+ this._hoverTimeoutId = Mainloop.timeout_add(300, () => {
|
||||
+ this._hoverText.style = `max-width: ${2 * this.icon.iconSize}px;`;
|
||||
+ this._hoverText.ensure_style();
|
||||
+
|
||||
+ let [x, y] = this.icon.label.get_transformed_position();
|
||||
+ let offset = (this._hoverText.width - this.icon.label.width) / 2;
|
||||
+ this._hoverText.set_position(Math.floor(x - offset), Math.floor(y));
|
||||
+ this._hoverText.show();
|
||||
+
|
||||
+ this._hoverTimeoutId = 0;
|
||||
+ return GLib.SOURCE_REMOVE;
|
||||
+ });
|
||||
+ } else {
|
||||
+ this._removeHoverTimeout();
|
||||
+ this._hoverText.hide();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
_removeMenuTimeout() {
|
||||
if (this._menuTimeoutId > 0) {
|
||||
Mainloop.source_remove(this._menuTimeoutId);
|
||||
@@ -1522,6 +1563,13 @@ var AppIcon = class AppIcon {
|
||||
}
|
||||
}
|
||||
|
||||
+ _removeHoverTimeout() {
|
||||
+ if (this._hoverTimeoutId > 0) {
|
||||
+ Mainloop.source_remove(this._hoverTimeoutId);
|
||||
+ this._hoverTimeoutId = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
_updateRunningStyle() {
|
||||
if (this.app.state != Shell.AppState.STOPPED)
|
||||
this._dot.show();
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 165fc5147cd2c9bf4bc10a1c5a9a940ec4ddd8d9 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 12:51:16 -0500
|
||||
Subject: [PATCH 1/4] background: refresh after suspend on wayland
|
||||
|
||||
At the moment we only refresh after suspend on Xorg.
|
||||
|
||||
We need to do it on wayland, too.
|
||||
---
|
||||
src/shell-util.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/shell-util.c b/src/shell-util.c
|
||||
index 31bb18e70..c6e5abed6 100644
|
||||
--- a/src/shell-util.c
|
||||
+++ b/src/shell-util.c
|
||||
@@ -395,9 +395,6 @@ get_gl_vendor (void)
|
||||
gboolean
|
||||
shell_util_need_background_refresh (void)
|
||||
{
|
||||
- if (!clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||||
- return FALSE;
|
||||
-
|
||||
if (g_strcmp0 (get_gl_vendor (), "NVIDIA Corporation") == 0)
|
||||
return TRUE;
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 1dcae7bbba222a1c8bdfc2d76a9f716e638b0334 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 8 Jun 2017 12:04:31 -0400
|
||||
Subject: [PATCH] data: install process-working.svg to filesystem
|
||||
|
||||
This helps prevent unlock failure on inplace upgrades between
|
||||
7.3 and 7.4
|
||||
---
|
||||
data/theme/meson.build | 2 ++
|
||||
meson.build | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/data/theme/meson.build b/data/theme/meson.build
|
||||
index 22bae3dd2..d5acb8d10 100644
|
||||
--- a/data/theme/meson.build
|
||||
+++ b/data/theme/meson.build
|
||||
@@ -23,3 +23,5 @@ foreach style: styles
|
||||
],
|
||||
depend_files: theme_sources)
|
||||
endforeach
|
||||
+
|
||||
+install_data('process-working.svg', install_dir: themedir)
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 21a80bcc8..0acaba705 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -57,6 +57,7 @@ localedir = join_paths(datadir, 'locale')
|
||||
portaldir = join_paths(datadir, 'xdg-desktop-portal', 'portals')
|
||||
schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
servicedir = join_paths(datadir, 'dbus-1', 'services')
|
||||
+themedir = join_paths(pkgdatadir, 'theme')
|
||||
|
||||
# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
|
||||
# depend on this version, replace with something like:
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,72 @@
|
||||
From d1a20dc80c3414ba4cb7bf839a25de49d30ab400 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Mon, 21 Sep 2015 20:18:12 +0200
|
||||
Subject: [PATCH] extensionSystem: Notify about extension issues on update
|
||||
|
||||
---
|
||||
js/ui/extensionSystem.js | 34 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
|
||||
index 9ffdb4f3d..eb820ba4f 100644
|
||||
--- a/js/ui/extensionSystem.js
|
||||
+++ b/js/ui/extensionSystem.js
|
||||
@@ -1,8 +1,9 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
-const { Gio, St } = imports.gi;
|
||||
+const { Gio, GLib, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
+const Config = imports.misc.config;
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const Main = imports.ui.main;
|
||||
|
||||
@@ -312,6 +313,36 @@ function _onVersionValidationChanged() {
|
||||
}
|
||||
}
|
||||
|
||||
+function _doUpdateCheck() {
|
||||
+ let version = Config.PACKAGE_VERSION.split('.');
|
||||
+ if (parseInt(version[1]) % 2 == 0)
|
||||
+ version.pop();
|
||||
+
|
||||
+ let pkgCacheDir = GLib.get_user_cache_dir() + '/gnome-shell/';
|
||||
+ let updateStamp = Gio.file_new_for_path(pkgCacheDir +
|
||||
+ 'update-check-' + version.join('.'));
|
||||
+ if (updateStamp.query_exists(null))
|
||||
+ return;
|
||||
+
|
||||
+ GLib.mkdir_with_parents (pkgCacheDir, 0o755);
|
||||
+ updateStamp.create(0, null).close(null);
|
||||
+
|
||||
+ let nOutdated = enabledExtensions.reduce(function(n, uuid) {
|
||||
+ let extension = ExtensionUtils.extensions[uuid];
|
||||
+ if (extension && extension.state == ExtensionState.OUT_OF_DATE)
|
||||
+ n++;
|
||||
+ return n;
|
||||
+ }, 0);
|
||||
+
|
||||
+ if (nOutdated == 0)
|
||||
+ return;
|
||||
+
|
||||
+ Main.notify(ngettext("%d extension is out of date",
|
||||
+ "%d extensions are out of date",
|
||||
+ nOutdated).format(nOutdated),
|
||||
+ _("You can visit http://extensions.gnome.org for updates"));
|
||||
+}
|
||||
+
|
||||
function _loadExtensions() {
|
||||
global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
|
||||
global.settings.connect('changed::' + DISABLE_USER_EXTENSIONS_KEY, onEnabledExtensionsChanged);
|
||||
@@ -326,6 +357,7 @@ function _loadExtensions() {
|
||||
extension.type = ExtensionUtils.ExtensionType.SESSION_MODE;
|
||||
});
|
||||
finder.scanExtensions();
|
||||
+ _doUpdateCheck();
|
||||
}
|
||||
|
||||
function enableAllExtensions() {
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 720eb83ba0b0e5e37185d7e7ed86fe9175cf18f4 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Fri, 8 Nov 2013 13:58:09 +0100
|
||||
Subject: [PATCH] extensions: Add a SESSION_MODE extension type
|
||||
|
||||
This allows e.g. gnome-tweak-tool to present these extensions in a
|
||||
different way since they can't be disabled.
|
||||
---
|
||||
js/misc/extensionUtils.js | 3 ++-
|
||||
js/ui/extensionSystem.js | 2 ++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js
|
||||
index cf308b31f..fb1e2b506 100644
|
||||
--- a/js/misc/extensionUtils.js
|
||||
+++ b/js/misc/extensionUtils.js
|
||||
@@ -13,7 +13,8 @@ const FileUtils = imports.misc.fileUtils;
|
||||
|
||||
var ExtensionType = {
|
||||
SYSTEM: 1,
|
||||
- PER_USER: 2
|
||||
+ PER_USER: 2,
|
||||
+ SESSION_MODE: 3
|
||||
};
|
||||
|
||||
// Maps uuid -> metadata object
|
||||
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
|
||||
index 6244c39b4..9ffdb4f3d 100644
|
||||
--- a/js/ui/extensionSystem.js
|
||||
+++ b/js/ui/extensionSystem.js
|
||||
@@ -322,6 +322,8 @@ function _loadExtensions() {
|
||||
let finder = new ExtensionUtils.ExtensionFinder();
|
||||
finder.connect('extension-found', (finder, extension) => {
|
||||
loadExtension(extension);
|
||||
+ if (Main.sessionMode.enabledExtensions.indexOf(extension.uuid) != -1)
|
||||
+ extension.type = ExtensionUtils.ExtensionType.SESSION_MODE;
|
||||
});
|
||||
finder.scanExtensions();
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
237
SOURCES/0001-gdm-add-AuthList-control.patch
Normal file
237
SOURCES/0001-gdm-add-AuthList-control.patch
Normal file
@ -0,0 +1,237 @@
|
||||
From 592bf9b4ba879a365375a7edcb6c48258386e413 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 18 Jul 2017 12:58:14 -0400
|
||||
Subject: [PATCH 1/2] gdm: add AuthList control
|
||||
|
||||
Ultimately, we want to add support for GDM's new ChoiceList
|
||||
PAM extension. That extension allows PAM modules to present
|
||||
a list of choices to the user. Before we can support that
|
||||
extension, however, we need to have a list control in the
|
||||
login-screen/unlock screen. This commit adds that control.
|
||||
|
||||
For the most part, it's a copy-and-paste of the gdm userlist,
|
||||
but with less features. It lacks API specific to the users,
|
||||
lacks the built in timed login indicator, etc. It does feature
|
||||
a label heading.
|
||||
---
|
||||
js/gdm/authList.js | 195 ++++++++++++++++++++++++++++++++++
|
||||
js/js-resources.gresource.xml | 1 +
|
||||
2 files changed, 196 insertions(+)
|
||||
create mode 100644 js/gdm/authList.js
|
||||
|
||||
diff --git a/js/gdm/authList.js b/js/gdm/authList.js
|
||||
new file mode 100644
|
||||
index 000000000..fc1c3d6e4
|
||||
--- /dev/null
|
||||
+++ b/js/gdm/authList.js
|
||||
@@ -0,0 +1,195 @@
|
||||
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
+/*
|
||||
+ * Copyright 2017 Red Hat, Inc
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2, or (at your option)
|
||||
+ * any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+const Clutter = imports.gi.Clutter;
|
||||
+const GObject = imports.gi.GObject;
|
||||
+const Gtk = imports.gi.Gtk;
|
||||
+const Lang = imports.lang;
|
||||
+const Meta = imports.gi.Meta;
|
||||
+const Signals = imports.signals;
|
||||
+const St = imports.gi.St;
|
||||
+
|
||||
+const Tweener = imports.ui.tweener;
|
||||
+
|
||||
+const _SCROLL_ANIMATION_TIME = 0.5;
|
||||
+
|
||||
+const AuthListItem = new Lang.Class({
|
||||
+ Name: 'AuthListItem',
|
||||
+
|
||||
+ _init(key, text) {
|
||||
+ this.key = key;
|
||||
+ let label = new St.Label({ style_class: 'auth-list-item-label',
|
||||
+ y_align: Clutter.ActorAlign.CENTER });
|
||||
+ label.text = text;
|
||||
+
|
||||
+ this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
|
||||
+ button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||
+ can_focus: true,
|
||||
+ child: label,
|
||||
+ reactive: true,
|
||||
+ x_align: St.Align.START,
|
||||
+ x_fill: true });
|
||||
+
|
||||
+ this.actor.connect('key-focus-in', () => {
|
||||
+ this._setSelected(true);
|
||||
+ });
|
||||
+ this.actor.connect('key-focus-out', () => {
|
||||
+ this._setSelected(false);
|
||||
+ });
|
||||
+ this.actor.connect('notify::hover', () => {
|
||||
+ this._setSelected(this.actor.hover);
|
||||
+ });
|
||||
+
|
||||
+ this.actor.connect('clicked', this._onClicked.bind(this));
|
||||
+ },
|
||||
+
|
||||
+ _onClicked() {
|
||||
+ this.emit('activate');
|
||||
+ },
|
||||
+
|
||||
+ _setSelected(selected) {
|
||||
+ if (selected) {
|
||||
+ this.actor.add_style_pseudo_class('selected');
|
||||
+ this.actor.grab_key_focus();
|
||||
+ } else {
|
||||
+ this.actor.remove_style_pseudo_class('selected');
|
||||
+ }
|
||||
+ }
|
||||
+});
|
||||
+Signals.addSignalMethods(AuthListItem.prototype);
|
||||
+
|
||||
+const AuthList = new Lang.Class({
|
||||
+ Name: 'AuthList',
|
||||
+
|
||||
+ _init() {
|
||||
+ this.actor = new St.BoxLayout({ vertical: true,
|
||||
+ style_class: 'login-dialog-auth-list-layout' });
|
||||
+
|
||||
+ this.label = new St.Label({ style_class: 'prompt-dialog-headline' });
|
||||
+ this.actor.add_actor(this.label);
|
||||
+
|
||||
+ this._scrollView = new St.ScrollView({ style_class: 'login-dialog-user-list-view'});
|
||||
+ this._scrollView.set_policy(Gtk.PolicyType.NEVER,
|
||||
+ Gtk.PolicyType.AUTOMATIC);
|
||||
+ this.actor.add_actor(this._scrollView);
|
||||
+
|
||||
+ this._box = new St.BoxLayout({ vertical: true,
|
||||
+ style_class: 'login-dialog-user-list',
|
||||
+ pseudo_class: 'expanded' });
|
||||
+
|
||||
+ this._scrollView.add_actor(this._box);
|
||||
+ this._items = {};
|
||||
+
|
||||
+ this.actor.connect('key-focus-in', this._moveFocusToItems.bind(this));
|
||||
+ },
|
||||
+
|
||||
+ _moveFocusToItems() {
|
||||
+ let hasItems = Object.keys(this._items).length > 0;
|
||||
+
|
||||
+ if (!hasItems)
|
||||
+ return;
|
||||
+
|
||||
+ if (global.stage.get_key_focus() != this.actor)
|
||||
+ return;
|
||||
+
|
||||
+ let focusSet = this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||
+ if (!focusSet) {
|
||||
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
+ this._moveFocusToItems();
|
||||
+ return false;
|
||||
+ });
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
+ _onItemActivated(activatedItem) {
|
||||
+ this.emit('activate', activatedItem.key);
|
||||
+ },
|
||||
+
|
||||
+ scrollToItem(item) {
|
||||
+ let box = item.actor.get_allocation_box();
|
||||
+
|
||||
+ let adjustment = this._scrollView.get_vscroll_bar().get_adjustment();
|
||||
+
|
||||
+ let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
|
||||
+ Tweener.removeTweens(adjustment);
|
||||
+ Tweener.addTween (adjustment,
|
||||
+ { value: value,
|
||||
+ time: _SCROLL_ANIMATION_TIME,
|
||||
+ transition: 'easeOutQuad' });
|
||||
+ },
|
||||
+
|
||||
+ jumpToItem(item) {
|
||||
+ let box = item.actor.get_allocation_box();
|
||||
+
|
||||
+ let adjustment = this._scrollView.get_vscroll_bar().get_adjustment();
|
||||
+
|
||||
+ let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
|
||||
+
|
||||
+ adjustment.set_value(value);
|
||||
+ },
|
||||
+
|
||||
+ getItem(key) {
|
||||
+ let item = this._items[key];
|
||||
+
|
||||
+ if (!item)
|
||||
+ return null;
|
||||
+
|
||||
+ return item;
|
||||
+ },
|
||||
+
|
||||
+ addItem(key, text) {
|
||||
+ this.removeItem(key);
|
||||
+
|
||||
+ let item = new AuthListItem(key, text);
|
||||
+ this._box.add(item.actor, { x_fill: true });
|
||||
+
|
||||
+ this._items[key] = item;
|
||||
+
|
||||
+ item.connect('activate',
|
||||
+ this._onItemActivated.bind(this));
|
||||
+
|
||||
+ // Try to keep the focused item front-and-center
|
||||
+ item.actor.connect('key-focus-in',
|
||||
+ () => { this.scrollToItem(item); });
|
||||
+
|
||||
+ this._moveFocusToItems();
|
||||
+
|
||||
+ this.emit('item-added', item);
|
||||
+ },
|
||||
+
|
||||
+ removeItem(key) {
|
||||
+ let item = this._items[key];
|
||||
+
|
||||
+ if (!item)
|
||||
+ return;
|
||||
+
|
||||
+ item.actor.destroy();
|
||||
+ delete this._items[key];
|
||||
+ },
|
||||
+
|
||||
+ numItems() {
|
||||
+ return Object.keys(this._items).length;
|
||||
+ },
|
||||
+
|
||||
+ clear() {
|
||||
+ this.label.text = "";
|
||||
+ this._box.destroy_all_children();
|
||||
+ this._items = {};
|
||||
+ }
|
||||
+});
|
||||
+Signals.addSignalMethods(AuthList.prototype);
|
||||
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
|
||||
index 836d1c674..002b202f8 100644
|
||||
--- a/js/js-resources.gresource.xml
|
||||
+++ b/js/js-resources.gresource.xml
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gnome/shell">
|
||||
+ <file>gdm/authList.js</file>
|
||||
<file>gdm/authPrompt.js</file>
|
||||
<file>gdm/batch.js</file>
|
||||
<file>gdm/fingerprint.js</file>
|
||||
--
|
||||
2.21.0
|
||||
|
32
SOURCES/0001-loginDialog-make-info-messages-themed.patch
Normal file
32
SOURCES/0001-loginDialog-make-info-messages-themed.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 9cfa56d4f3c5fe513630c58c09bd2421f3ca580b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 14:35:05 -0400
|
||||
Subject: [PATCH] loginDialog: make info messages themed
|
||||
|
||||
They were lacking a definition before leading them to
|
||||
show up invisible.
|
||||
---
|
||||
data/theme/gnome-shell-sass/_common.scss | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
|
||||
index c2df28279..a382ce561 100644
|
||||
--- a/data/theme/gnome-shell-sass/_common.scss
|
||||
+++ b/data/theme/gnome-shell-sass/_common.scss
|
||||
@@ -1801,7 +1801,12 @@ StScrollBar {
|
||||
.login-dialog-banner { color: darken($osd_fg_color,10%); }
|
||||
.login-dialog-button-box { spacing: 5px; }
|
||||
.login-dialog-message-warning { color: $warning_color; }
|
||||
- .login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; }
|
||||
+ .login-dialog-message-hint, .login-dialog-message {
|
||||
+ color: darken($osd_fg_color, 20%);
|
||||
+ padding-top: 0;
|
||||
+ padding-bottom: 20px;
|
||||
+ min-height: 2.75em;
|
||||
+ }
|
||||
.login-dialog-user-selection-box { padding: 100px 0px; }
|
||||
.login-dialog-not-listed-label {
|
||||
padding-left: 2px;
|
||||
--
|
||||
2.21.0
|
||||
|
54
SOURCES/0001-panel-add-an-icon-to-the-ActivitiesButton.patch
Normal file
54
SOURCES/0001-panel-add-an-icon-to-the-ActivitiesButton.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From aadb0e19999c339ac1d6501a2e52b363e57e26ef Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 15 Jan 2014 16:45:34 -0500
|
||||
Subject: [PATCH] panel: add an icon to the ActivitiesButton
|
||||
|
||||
Requested by brand
|
||||
---
|
||||
data/theme/gnome-shell-sass/_common.scss | 5 +++++
|
||||
js/ui/panel.js | 9 ++++++++-
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
|
||||
index a382ce561..3b0d2bf04 100644
|
||||
--- a/data/theme/gnome-shell-sass/_common.scss
|
||||
+++ b/data/theme/gnome-shell-sass/_common.scss
|
||||
@@ -769,6 +769,11 @@ StScrollBar {
|
||||
//dimensions of the icon are hardcoded
|
||||
}
|
||||
|
||||
+ .panel-logo-icon {
|
||||
+ padding-right: .4em;
|
||||
+ icon-size: 1em;
|
||||
+ }
|
||||
+
|
||||
&:hover {
|
||||
color: lighten($fg_color, 10%);
|
||||
}
|
||||
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
||||
index 16484850a..ede1c2b82 100644
|
||||
--- a/js/ui/panel.js
|
||||
+++ b/js/ui/panel.js
|
||||
@@ -465,11 +465,18 @@ class ActivitiesButton extends PanelMenu.Button {
|
||||
|
||||
this.actor.name = 'panelActivities';
|
||||
|
||||
+ let box = new St.BoxLayout();
|
||||
+ this.actor.add_actor(box);
|
||||
+ let iconFile = Gio.File.new_for_path('/usr/share/icons/hicolor/scalable/apps/start-here.svg');
|
||||
+ this._icon = new St.Icon({ gicon: new Gio.FileIcon({ file: iconFile }),
|
||||
+ style_class: 'panel-logo-icon' });
|
||||
+ box.add_actor(this._icon);
|
||||
+
|
||||
/* Translators: If there is no suitable word for "Activities"
|
||||
in your language, you can use the word for "Overview". */
|
||||
this._label = new St.Label({ text: _("Activities"),
|
||||
y_align: Clutter.ActorAlign.CENTER });
|
||||
- this.actor.add_actor(this._label);
|
||||
+ box.add_actor(this._label);
|
||||
|
||||
this.actor.label_actor = this._label;
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,33 @@
|
||||
From cacce594f07295bb1b9e0685913a287e3cea2453 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 3 Jul 2015 13:54:36 -0400
|
||||
Subject: [PATCH] screenShield: unblank when inserting smartcard
|
||||
|
||||
If a user inserts the smartcard when the screen is locked/blanked
|
||||
we should ask them their pin right away.
|
||||
|
||||
At the moment they have to wiggle the mouse or do some other
|
||||
action to get the screen to unblank.
|
||||
---
|
||||
js/ui/screenShield.js | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
|
||||
index a005a206b..cd38f11fc 100644
|
||||
--- a/js/ui/screenShield.js
|
||||
+++ b/js/ui/screenShield.js
|
||||
@@ -513,8 +513,10 @@ var ScreenShield = class {
|
||||
this._smartcardManager = SmartcardManager.getSmartcardManager();
|
||||
this._smartcardManager.connect('smartcard-inserted',
|
||||
(manager, token) => {
|
||||
- if (this._isLocked && token.UsedToLogin)
|
||||
+ if (this._isLocked && token.UsedToLogin) {
|
||||
+ this._wakeUpScreen();
|
||||
this._liftShield(true, 0);
|
||||
+ }
|
||||
});
|
||||
|
||||
this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,66 @@
|
||||
From 660ebe0125b591355116934ee57b08010e05246c Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Fri, 8 Nov 2013 11:36:04 +0100
|
||||
Subject: [PATCH] shellDBus: Add a DBus method to load a single extension
|
||||
|
||||
This allows e.g. gnome-tweak-tool to install an extension from a zip
|
||||
file and load it into the running shell.
|
||||
---
|
||||
.../org.gnome.Shell.Extensions.xml | 13 +++++++++++++
|
||||
js/ui/shellDBus.js | 16 ++++++++++++++++
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces/org.gnome.Shell.Extensions.xml b/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
|
||||
index 34a65af44..ce69439fc 100644
|
||||
--- a/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
|
||||
+++ b/data/dbus-interfaces/org.gnome.Shell.Extensions.xml
|
||||
@@ -189,6 +189,19 @@
|
||||
-->
|
||||
<method name="CheckForUpdates"/>
|
||||
|
||||
+ <!--
|
||||
+ LoadUserExtension:
|
||||
+ @uuid: The UUID of the extension
|
||||
+ @success: Whether the operation was successful
|
||||
+
|
||||
+ Load a newly installed user extension
|
||||
+ -->
|
||||
+
|
||||
+ <method name="LoadUserExtension">
|
||||
+ <arg type="s" direction="in" name="uuid"/>
|
||||
+ <arg type="b" direction="out" name="success"/>
|
||||
+ </method>
|
||||
+
|
||||
<signal name="ExtensionStatusChanged">
|
||||
<arg type="s" name="uuid"/>
|
||||
<arg type="i" name="state"/>
|
||||
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
|
||||
index 19d07acce..112d60feb 100644
|
||||
--- a/js/ui/shellDBus.js
|
||||
+++ b/js/ui/shellDBus.js
|
||||
@@ -341,6 +341,22 @@ var GnomeShellExtensions = class {
|
||||
ExtensionDownloader.checkForUpdates();
|
||||
}
|
||||
|
||||
+ LoadUserExtension(uuid) {
|
||||
+ let extension = ExtensionUtils.extensions[uuid];
|
||||
+ if (extension)
|
||||
+ return true;
|
||||
+
|
||||
+ let dir = Gio.File.new_for_path(GLib.build_filenamev([global.userdatadir, 'extensions', uuid]));
|
||||
+ try {
|
||||
+ extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
|
||||
+ ExtensionSystem.loadExtension(extension);
|
||||
+ } catch (e) {
|
||||
+ log('Could not load user extension from %s'.format(dir.get_path()));
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
get ShellVersion() {
|
||||
return Config.PACKAGE_VERSION;
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 20640a92f98e2145b9b6581209c978e9f6f78801 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 14 Mar 2017 17:04:36 +0100
|
||||
Subject: [PATCH] windowMenu: Bring back workspaces submenu for static
|
||||
workspaces
|
||||
|
||||
When the titlebar context menu was moved to the shell, the submenu for
|
||||
moving to a specific workspace was intentionally left out; some people
|
||||
are quite attached to it though, so bring it back when static workspaces
|
||||
are used.
|
||||
---
|
||||
js/ui/windowMenu.js | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
|
||||
index 628f145ea..f8eb4398c 100644
|
||||
--- a/js/ui/windowMenu.js
|
||||
+++ b/js/ui/windowMenu.js
|
||||
@@ -115,6 +115,23 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
|
||||
window.change_workspace(workspace.get_neighbor(dir));
|
||||
});
|
||||
}
|
||||
+
|
||||
+ let { workspaceManager } = global;
|
||||
+ let nWorkspaces = workspaceManager.n_workspaces;
|
||||
+ if (nWorkspaces > 1 && !Meta.prefs_get_dynamic_workspaces()) {
|
||||
+ item = new PopupMenu.PopupSubMenuMenuItem(_("Move to another workspace"));
|
||||
+ this.addMenuItem(item);
|
||||
+
|
||||
+ let currentIndex = workspaceManager.get_active_workspace_index();
|
||||
+ for (let i = 0; i < nWorkspaces; i++) {
|
||||
+ let index = i;
|
||||
+ let name = Meta.prefs_get_workspace_name(i);
|
||||
+ let subitem = item.menu.addAction(name, () => {
|
||||
+ window.change_workspace_by_index(index, false);
|
||||
+ });
|
||||
+ subitem.setSensitive(currentIndex != i);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 1a546d4df199f498b838efdccf081ada8ed1960b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 12:52:49 -0500
|
||||
Subject: [PATCH 2/4] background: rebuild background, not just animation on
|
||||
resume
|
||||
|
||||
Previously, we would only refresh the animation on resume
|
||||
(to handle clock skew).
|
||||
|
||||
But we actually need to rebuild the background, too, on nvidia,
|
||||
so we should just do a full background change.
|
||||
---
|
||||
js/ui/background.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/background.js b/js/ui/background.js
|
||||
index 06e038816..75b76a57e 100644
|
||||
--- a/js/ui/background.js
|
||||
+++ b/js/ui/background.js
|
||||
@@ -254,7 +254,7 @@ var Background = class Background {
|
||||
(lm, aboutToSuspend) => {
|
||||
if (aboutToSuspend)
|
||||
return;
|
||||
- this._refreshAnimation();
|
||||
+ this.emit('changed');
|
||||
});
|
||||
|
||||
this._settingsChangedSignalId = this._settings.connect('changed', () => {
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,267 @@
|
||||
From c3ab03f8721ea96df6ac91c0393ed13ba750ab7e Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 17 Jul 2017 16:48:03 -0400
|
||||
Subject: [PATCH 2/2] gdmUtil: enable support for GDM's ChoiceList PAM
|
||||
extension
|
||||
|
||||
This commit hooks up support for GDM's ChoiceList PAM extension.
|
||||
---
|
||||
js/gdm/authPrompt.js | 74 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
js/gdm/loginDialog.js | 5 +++
|
||||
js/gdm/util.js | 28 ++++++++++++++++
|
||||
js/ui/unlockDialog.js | 9 +++++-
|
||||
4 files changed, 114 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index cf77b3f26..71069e93b 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -4,6 +4,7 @@ const { Clutter, GLib, Pango, Shell, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
+const AuthList = imports.gdm.authList;
|
||||
const Batch = imports.gdm.batch;
|
||||
const GdmUtil = imports.gdm.util;
|
||||
const Meta = imports.gi.Meta;
|
||||
@@ -54,6 +55,7 @@ var AuthPrompt = class {
|
||||
|
||||
this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this));
|
||||
this._userVerifier.connect('show-message', this._onShowMessage.bind(this));
|
||||
+ this._userVerifier.connect('show-choice-list', this._onShowChoiceList.bind(this));
|
||||
this._userVerifier.connect('verification-failed', this._onVerificationFailed.bind(this));
|
||||
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||
this._userVerifier.connect('reset', this._onReset.bind(this));
|
||||
@@ -116,6 +118,28 @@ var AuthPrompt = class {
|
||||
|
||||
this.actor.add(this._timedLoginIndicator);
|
||||
|
||||
+ this._authList = new AuthList.AuthList();
|
||||
+ this._authList.connect('activate', (list, key) => {
|
||||
+ this._authList.actor.reactive = false;
|
||||
+ Tweener.addTween(this._authList.actor,
|
||||
+ { opacity: 0,
|
||||
+ time: MESSAGE_FADE_OUT_ANIMATION_TIME,
|
||||
+ transition: 'easeOutQuad',
|
||||
+ onComplete: () => {
|
||||
+ this._authList.clear();
|
||||
+ this._authList.actor.hide();
|
||||
+ this._userVerifier.selectChoice(this._queryingService, key);
|
||||
+
|
||||
+ }
|
||||
+ });
|
||||
+ });
|
||||
+ this._authList.actor.hide();
|
||||
+ this.actor.add(this._authList.actor,
|
||||
+ { expand: true,
|
||||
+ x_fill: true,
|
||||
+ y_fill: false,
|
||||
+ x_align: St.Align.START });
|
||||
+
|
||||
this._message = new St.Label({ opacity: 0,
|
||||
styleClass: 'login-dialog-message' });
|
||||
this._message.clutter_text.line_wrap = true;
|
||||
@@ -258,6 +282,21 @@ var AuthPrompt = class {
|
||||
this.emit('prompted');
|
||||
}
|
||||
|
||||
+ _onShowChoiceList(userVerifier, serviceName, promptMessage, choiceList) {
|
||||
+ if (this._queryingService)
|
||||
+ this.clear();
|
||||
+
|
||||
+ this._queryingService = serviceName;
|
||||
+
|
||||
+ if (this._preemptiveAnswer)
|
||||
+ this._preemptiveAnswer = null;
|
||||
+
|
||||
+ this.nextButton.label = _("Next");
|
||||
+ this.setChoiceList(promptMessage, choiceList);
|
||||
+ this.updateSensitivity(true);
|
||||
+ this.emit('prompted');
|
||||
+ }
|
||||
+
|
||||
_onOVirtUserAuthenticated() {
|
||||
if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
|
||||
this.reset();
|
||||
@@ -386,6 +425,8 @@ var AuthPrompt = class {
|
||||
clear() {
|
||||
this._entry.text = '';
|
||||
this.stopSpinning();
|
||||
+ this._authList.clear();
|
||||
+ this._authList.actor.hide();
|
||||
}
|
||||
|
||||
setPasswordChar(passwordChar) {
|
||||
@@ -401,12 +442,42 @@ var AuthPrompt = class {
|
||||
|
||||
this._label.set_text(question);
|
||||
|
||||
+ this._authList.actor.hide();
|
||||
this._label.show();
|
||||
this._entry.show();
|
||||
|
||||
this._entry.grab_key_focus();
|
||||
}
|
||||
|
||||
+ _fadeInChoiceList() {
|
||||
+ this._authList.actor.opacity = 0;
|
||||
+ this._authList.actor.show();
|
||||
+ this._authList.actor.reactive = false;
|
||||
+ Tweener.addTween(this._authList.actor,
|
||||
+ { opacity: 255,
|
||||
+ time: MESSAGE_FADE_OUT_ANIMATION_TIME,
|
||||
+ transition: 'easeOutQuad',
|
||||
+ onComplete: () => {
|
||||
+ this._authList.actor.reactive = true;
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ setChoiceList(promptMessage, choiceList) {
|
||||
+ this._authList.clear();
|
||||
+ this._authList.label.text = promptMessage;
|
||||
+ for (let key in choiceList) {
|
||||
+ let text = choiceList[key];
|
||||
+ this._authList.addItem(key, text);
|
||||
+ }
|
||||
+
|
||||
+ this._label.hide();
|
||||
+ this._entry.hide();
|
||||
+ if (this._message.text == "")
|
||||
+ this._message.hide();
|
||||
+ this._fadeInChoiceList();
|
||||
+ }
|
||||
+
|
||||
getAnswer() {
|
||||
let text;
|
||||
|
||||
@@ -442,6 +513,7 @@ var AuthPrompt = class {
|
||||
else
|
||||
this._message.remove_style_class_name('login-dialog-message-hint');
|
||||
|
||||
+ this._message.show();
|
||||
if (message) {
|
||||
Tweener.removeTweens(this._message);
|
||||
this._message.text = message;
|
||||
@@ -457,7 +529,7 @@ var AuthPrompt = class {
|
||||
}
|
||||
|
||||
updateSensitivity(sensitive) {
|
||||
- this._updateNextButtonSensitivity(sensitive && (this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING));
|
||||
+ this._updateNextButtonSensitivity(sensitive && !this._authList.actor.visible && (this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING));
|
||||
this._entry.reactive = sensitive;
|
||||
this._entry.clutter_text.editable = sensitive;
|
||||
}
|
||||
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
||||
index 9aaa013d8..942f5a0e5 100644
|
||||
--- a/js/gdm/loginDialog.js
|
||||
+++ b/js/gdm/loginDialog.js
|
||||
@@ -406,6 +406,11 @@ var LoginDialog = GObject.registerClass({
|
||||
this._userManager = AccountsService.UserManager.get_default()
|
||||
this._gdmClient = new Gdm.Client();
|
||||
|
||||
+ try {
|
||||
+ this._gdmClient.set_enabled_extensions([Gdm.UserVerifierChoiceList.interface_info().name]);
|
||||
+ } catch(e) {
|
||||
+ }
|
||||
+
|
||||
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||
|
||||
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index 6e940d2ab..9e249139d 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -192,6 +192,10 @@ var ShellUserVerifier = class {
|
||||
if (this._userVerifier) {
|
||||
this._userVerifier.run_dispose();
|
||||
this._userVerifier = null;
|
||||
+ if (this._userVerifierChoiceList) {
|
||||
+ this._userVerifierChoiceList.run_dispose();
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +223,10 @@ var ShellUserVerifier = class {
|
||||
this._oVirtCredentialsManager = null;
|
||||
}
|
||||
|
||||
+ selectChoice(serviceName, key) {
|
||||
+ this._userVerifierChoiceList.call_select_choice(serviceName, key, this._cancellable, null);
|
||||
+ }
|
||||
+
|
||||
answerQuery(serviceName, answer) {
|
||||
if (!this.hasPendingMessages) {
|
||||
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
|
||||
@@ -362,6 +370,11 @@ var ShellUserVerifier = class {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (client.get_user_verifier_choice_list)
|
||||
+ this._userVerifierChoiceList = client.get_user_verifier_choice_list();
|
||||
+ else
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+
|
||||
this.reauthenticating = true;
|
||||
this._connectSignals();
|
||||
this._beginVerification();
|
||||
@@ -379,6 +392,11 @@ var ShellUserVerifier = class {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (client.get_user_verifier_choice_list)
|
||||
+ this._userVerifierChoiceList = client.get_user_verifier_choice_list();
|
||||
+ else
|
||||
+ this._userVerifierChoiceList = null;
|
||||
+
|
||||
this._connectSignals();
|
||||
this._beginVerification();
|
||||
this._hold.release();
|
||||
@@ -392,6 +410,9 @@ var ShellUserVerifier = class {
|
||||
this._userVerifier.connect('conversation-stopped', this._onConversationStopped.bind(this));
|
||||
this._userVerifier.connect('reset', this._onReset.bind(this));
|
||||
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
|
||||
+
|
||||
+ if (this._userVerifierChoiceList)
|
||||
+ this._userVerifierChoiceList.connect('choice-query', this._onChoiceListQuery.bind(this));
|
||||
}
|
||||
|
||||
_getForegroundService() {
|
||||
@@ -468,6 +489,13 @@ var ShellUserVerifier = class {
|
||||
this._startService(FINGERPRINT_SERVICE_NAME);
|
||||
}
|
||||
|
||||
+ _onChoiceListQuery(client, serviceName, promptMessage, list) {
|
||||
+ if (!this.serviceIsForeground(serviceName))
|
||||
+ return;
|
||||
+
|
||||
+ this.emit('show-choice-list', serviceName, promptMessage, list.deep_unpack());
|
||||
+ }
|
||||
+
|
||||
_onInfo(client, serviceName, info) {
|
||||
if (this.serviceIsForeground(serviceName)) {
|
||||
this._queueMessage(info, MessageType.INFO);
|
||||
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
||||
index 5c9d46021..4b0470f4b 100644
|
||||
--- a/js/ui/unlockDialog.js
|
||||
+++ b/js/ui/unlockDialog.js
|
||||
@@ -33,7 +33,14 @@ var UnlockDialog = class {
|
||||
y_expand: true });
|
||||
this.actor.add_child(this._promptBox);
|
||||
|
||||
- this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
||||
+ this._gdmClient = new Gdm.Client();
|
||||
+
|
||||
+ try {
|
||||
+ this._gdmClient.set_enabled_extensions([Gdm.UserVerifierChoiceList.interface_info().name]);
|
||||
+ } catch(e) {
|
||||
+ }
|
||||
+
|
||||
+ this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
||||
this._authPrompt.connect('failed', this._fail.bind(this));
|
||||
this._authPrompt.connect('cancelled', this._fail.bind(this));
|
||||
this._authPrompt.connect('reset', this._onReset.bind(this));
|
||||
--
|
||||
2.21.0
|
||||
|
66
SOURCES/0003-st-texture-cache-purge-on-resume.patch
Normal file
66
SOURCES/0003-st-texture-cache-purge-on-resume.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 2ebeda3385fb679df4bc13ba4b80bdeba5e2ad13 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 12:54:32 -0500
|
||||
Subject: [PATCH 3/4] st-texture-cache: purge on resume
|
||||
|
||||
With the proprietary nvidia driver, textures get garbled on suspend,
|
||||
so the texture cache needs to evict all textures in that situation.
|
||||
---
|
||||
js/ui/main.js | 6 +++++-
|
||||
src/st/st-texture-cache.c | 10 ++++++++++
|
||||
src/st/st-texture-cache.h | 1 +
|
||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/main.js b/js/ui/main.js
|
||||
index 061303cf3..8d1755cf1 100644
|
||||
--- a/js/ui/main.js
|
||||
+++ b/js/ui/main.js
|
||||
@@ -200,7 +200,11 @@ function _initializeUI() {
|
||||
return true;
|
||||
});
|
||||
|
||||
- global.display.connect('gl-video-memory-purged', loadTheme);
|
||||
+ global.display.connect('gl-video-memory-purged', () => {
|
||||
+ let cache = St.TextureCache.get_default();
|
||||
+ cache.clear();
|
||||
+ loadTheme();
|
||||
+ });
|
||||
|
||||
// Provide the bus object for gnome-session to
|
||||
// initiate logouts.
|
||||
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
|
||||
index cbe3afaba..40a11dd6d 100644
|
||||
--- a/src/st/st-texture-cache.c
|
||||
+++ b/src/st/st-texture-cache.c
|
||||
@@ -113,6 +113,16 @@ st_texture_cache_class_init (StTextureCacheClass *klass)
|
||||
G_TYPE_NONE, 1, G_TYPE_FILE);
|
||||
}
|
||||
|
||||
+/* Evicts all cached textures */
|
||||
+void
|
||||
+st_texture_cache_clear (StTextureCache *cache)
|
||||
+{
|
||||
+ g_return_if_fail (ST_IS_TEXTURE_CACHE (cache));
|
||||
+
|
||||
+ g_hash_table_remove_all (cache->priv->keyed_cache);
|
||||
+ g_signal_emit (cache, signals[ICON_THEME_CHANGED], 0);
|
||||
+}
|
||||
+
|
||||
/* Evicts all cached textures for named icons */
|
||||
static void
|
||||
st_texture_cache_evict_icons (StTextureCache *cache)
|
||||
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
|
||||
index 11d1c4e64..9079d1fda 100644
|
||||
--- a/src/st/st-texture-cache.h
|
||||
+++ b/src/st/st-texture-cache.h
|
||||
@@ -53,6 +53,7 @@ typedef enum {
|
||||
} StTextureCachePolicy;
|
||||
|
||||
StTextureCache* st_texture_cache_get_default (void);
|
||||
+void st_texture_cache_clear (StTextureCache *cache);
|
||||
|
||||
ClutterActor *
|
||||
st_texture_cache_load_sliced_image (StTextureCache *cache,
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,115 @@
|
||||
From 055bc14c70af66fe1893dcd4c42c65662ae1f9d0 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 21 Jan 2019 15:07:15 -0500
|
||||
Subject: [PATCH 4/4] background: refresh background on gl-video-memory-purged
|
||||
signal
|
||||
|
||||
Right now we refresh the background when resuming and when NVIDIA.
|
||||
But mutter has a signal to tell us specifically when to refresh,
|
||||
and the signal is only emitted for NVIDIA, so use that instead.
|
||||
---
|
||||
js/ui/background.js | 9 +++++++--
|
||||
js/ui/layout.js | 12 ------------
|
||||
src/shell-util.c | 27 ---------------------------
|
||||
src/shell-util.h | 2 --
|
||||
4 files changed, 7 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/js/ui/background.js b/js/ui/background.js
|
||||
index 75b76a57e..466cc4de7 100644
|
||||
--- a/js/ui/background.js
|
||||
+++ b/js/ui/background.js
|
||||
@@ -527,10 +527,15 @@ var BackgroundSource = class BackgroundSource {
|
||||
let monitorManager = Meta.MonitorManager.get();
|
||||
this._monitorsChangedId =
|
||||
monitorManager.connect('monitors-changed',
|
||||
- this._onMonitorsChanged.bind(this));
|
||||
+ this._refresh.bind(this));
|
||||
+
|
||||
+ global.display.connect('gl-video-memory-purged', () => {
|
||||
+ Meta.Background.refresh_all();
|
||||
+ this._refresh();
|
||||
+ });
|
||||
}
|
||||
|
||||
- _onMonitorsChanged() {
|
||||
+ _refresh() {
|
||||
for (let monitorIndex in this._backgrounds) {
|
||||
let background = this._backgrounds[monitorIndex];
|
||||
|
||||
diff --git a/js/ui/layout.js b/js/ui/layout.js
|
||||
index 30e750dc5..2b3bb7442 100644
|
||||
--- a/js/ui/layout.js
|
||||
+++ b/js/ui/layout.js
|
||||
@@ -282,18 +282,6 @@ var LayoutManager = GObject.registerClass({
|
||||
monitorManager.connect('monitors-changed',
|
||||
this._monitorsChanged.bind(this));
|
||||
this._monitorsChanged();
|
||||
-
|
||||
- // NVIDIA drivers don't preserve FBO contents across
|
||||
- // suspend/resume, see
|
||||
- // https://bugzilla.gnome.org/show_bug.cgi?id=739178
|
||||
- if (Shell.util_need_background_refresh()) {
|
||||
- LoginManager.getLoginManager().connect('prepare-for-sleep',
|
||||
- (lm, suspending) => {
|
||||
- if (suspending)
|
||||
- return;
|
||||
- Meta.Background.refresh_all();
|
||||
- });
|
||||
- }
|
||||
}
|
||||
|
||||
// This is called by Main after everything else is constructed
|
||||
diff --git a/src/shell-util.c b/src/shell-util.c
|
||||
index c6e5abed6..9c25643c6 100644
|
||||
--- a/src/shell-util.c
|
||||
+++ b/src/shell-util.c
|
||||
@@ -374,33 +374,6 @@ shell_util_create_pixbuf_from_data (const guchar *data,
|
||||
(GdkPixbufDestroyNotify) g_free, NULL);
|
||||
}
|
||||
|
||||
-typedef const gchar *(*ShellGLGetString) (GLenum);
|
||||
-
|
||||
-static const gchar *
|
||||
-get_gl_vendor (void)
|
||||
-{
|
||||
- static const gchar *vendor = NULL;
|
||||
-
|
||||
- if (!vendor)
|
||||
- {
|
||||
- ShellGLGetString gl_get_string;
|
||||
- gl_get_string = (ShellGLGetString) cogl_get_proc_address ("glGetString");
|
||||
- if (gl_get_string)
|
||||
- vendor = gl_get_string (GL_VENDOR);
|
||||
- }
|
||||
-
|
||||
- return vendor;
|
||||
-}
|
||||
-
|
||||
-gboolean
|
||||
-shell_util_need_background_refresh (void)
|
||||
-{
|
||||
- if (g_strcmp0 (get_gl_vendor (), "NVIDIA Corporation") == 0)
|
||||
- return TRUE;
|
||||
-
|
||||
- return FALSE;
|
||||
-}
|
||||
-
|
||||
static gboolean
|
||||
canvas_draw_cb (ClutterContent *content,
|
||||
cairo_t *cr,
|
||||
diff --git a/src/shell-util.h b/src/shell-util.h
|
||||
index 6904f43bc..049c3fe18 100644
|
||||
--- a/src/shell-util.h
|
||||
+++ b/src/shell-util.h
|
||||
@@ -44,8 +44,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data,
|
||||
int height,
|
||||
int rowstride);
|
||||
|
||||
-gboolean shell_util_need_background_refresh (void);
|
||||
-
|
||||
ClutterContent * shell_util_get_content_for_window_actor (MetaWindowActor *window_actor,
|
||||
MetaRectangle *window_rect);
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
158
SOURCES/allow-timed-login-with-no-user-list.patch
Normal file
158
SOURCES/allow-timed-login-with-no-user-list.patch
Normal file
@ -0,0 +1,158 @@
|
||||
From de891fadb0b40a9b6e84131b82086e42d86992a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 19 Apr 2016 13:12:46 -0400
|
||||
Subject: [PATCH] loginDialog: allow timed login with disabled user list
|
||||
|
||||
At the moment the timed login feature is implemented in the user list.
|
||||
If there's no user list, we don't show the indicator anywhere and
|
||||
don't proceed with timed login.
|
||||
|
||||
This commit allows timed login to work when the user list is disabled.
|
||||
It accomplishes this by putting the timed login indicator on the
|
||||
auth prompt, in that scenario.
|
||||
---
|
||||
data/theme/gnome-shell-sass/_common.scss | 4 +++
|
||||
js/gdm/authPrompt.js | 41 +++++++++++++++++++++++-
|
||||
js/gdm/loginDialog.js | 23 ++++++++++++-
|
||||
3 files changed, 66 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
|
||||
index a6357baad..c2df28279 100644
|
||||
--- a/data/theme/gnome-shell-sass/_common.scss
|
||||
+++ b/data/theme/gnome-shell-sass/_common.scss
|
||||
@@ -1856,6 +1856,10 @@ StScrollBar {
|
||||
padding-bottom: 12px;
|
||||
spacing: 8px;
|
||||
width: 23em;
|
||||
+ .login-dialog-timed-login-indicator {
|
||||
+ height: 2px;
|
||||
+ background-color: darken($fg_color,40%);
|
||||
+ }
|
||||
}
|
||||
|
||||
.login-dialog-prompt-label {
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index 27eb31a89..cf77b3f26 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -1,6 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
-const { Clutter, Pango, Shell, St } = imports.gi;
|
||||
+const { Clutter, GLib, Pango, Shell, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
@@ -111,6 +111,11 @@ var AuthPrompt = class {
|
||||
|
||||
this._entry.grab_key_focus();
|
||||
|
||||
+ this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
|
||||
+ scale_x: 0 });
|
||||
+
|
||||
+ this.actor.add(this._timedLoginIndicator);
|
||||
+
|
||||
this._message = new St.Label({ opacity: 0,
|
||||
styleClass: 'login-dialog-message' });
|
||||
this._message.clutter_text.line_wrap = true;
|
||||
@@ -135,6 +140,40 @@ var AuthPrompt = class {
|
||||
this._defaultButtonWell.add_child(this._spinner.actor);
|
||||
}
|
||||
|
||||
+ showTimedLoginIndicator(time) {
|
||||
+ let hold = new Batch.Hold();
|
||||
+
|
||||
+ this.hideTimedLoginIndicator();
|
||||
+
|
||||
+ let startTime = GLib.get_monotonic_time();
|
||||
+
|
||||
+ this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
|
||||
+ () => {
|
||||
+ let currentTime = GLib.get_monotonic_time();
|
||||
+ let elapsedTime = (currentTime - startTime) / GLib.USEC_PER_SEC;
|
||||
+ this._timedLoginIndicator.scale_x = elapsedTime / time;
|
||||
+ if (elapsedTime >= time) {
|
||||
+ this._timedLoginTimeoutId = 0;
|
||||
+ hold.release();
|
||||
+ return GLib.SOURCE_REMOVE;
|
||||
+ }
|
||||
+
|
||||
+ return GLib.SOURCE_CONTINUE;
|
||||
+ });
|
||||
+
|
||||
+ GLib.Source.set_name_by_id(this._timedLoginTimeoutId, '[gnome-shell] this._timedLoginTimeoutId');
|
||||
+
|
||||
+ return hold;
|
||||
+ }
|
||||
+
|
||||
+ hideTimedLoginIndicator() {
|
||||
+ if (this._timedLoginTimeoutId) {
|
||||
+ GLib.source_remove(this._timedLoginTimeoutId);
|
||||
+ this._timedLoginTimeoutId = 0;
|
||||
+ }
|
||||
+ this._timedLoginIndicator.scale_x = 0.;
|
||||
+ }
|
||||
+
|
||||
_onDestroy() {
|
||||
if (this._preemptiveAnswerWatchId) {
|
||||
this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
||||
index 6c4d1357d..9aaa013d8 100644
|
||||
--- a/js/gdm/loginDialog.js
|
||||
+++ b/js/gdm/loginDialog.js
|
||||
@@ -734,6 +734,9 @@ var LoginDialog = GObject.registerClass({
|
||||
|
||||
if (this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
|
||||
this._authPrompt.reset();
|
||||
+
|
||||
+ if (this._disableUserList && this._timedLoginUserListHold)
|
||||
+ this._timedLoginUserListHold.release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1020,9 +1023,21 @@ var LoginDialog = GObject.registerClass({
|
||||
let loginItem = null;
|
||||
let animationTime;
|
||||
|
||||
- let tasks = [() => this._waitForItemForUser(userName),
|
||||
+ let tasks = [() => {
|
||||
+ if (this._disableUserList)
|
||||
+ return;
|
||||
+
|
||||
+ this._timedLoginUserListHold = this._waitForItemForUser(userName);
|
||||
+
|
||||
+ return this._timedLoginUserListHold;
|
||||
+ },
|
||||
|
||||
() => {
|
||||
+ this._timedLoginUserListHold = null;
|
||||
+
|
||||
+ if (this._disableUserList)
|
||||
+ return;
|
||||
+
|
||||
loginItem = this._userList.getItemFromUserName(userName);
|
||||
|
||||
// If there is an animation running on the item, reset it.
|
||||
@@ -1030,6 +1045,9 @@ var LoginDialog = GObject.registerClass({
|
||||
},
|
||||
|
||||
() => {
|
||||
+ if (this._disableUserList)
|
||||
+ return;
|
||||
+
|
||||
// If we're just starting out, start on the right item.
|
||||
if (!this._userManager.is_loaded) {
|
||||
this._userList.jumpToItem(loginItem);
|
||||
@@ -1051,6 +1069,9 @@ var LoginDialog = GObject.registerClass({
|
||||
},
|
||||
|
||||
() => {
|
||||
+ if (this._disableUserList)
|
||||
+ return;
|
||||
+
|
||||
// If idle timeout is done, make sure the timed login indicator is shown
|
||||
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD &&
|
||||
this._authPrompt.actor.visible)
|
||||
--
|
||||
2.21.0
|
||||
|
167
SOURCES/disable-unlock-entry-until-question.patch
Normal file
167
SOURCES/disable-unlock-entry-until-question.patch
Normal file
@ -0,0 +1,167 @@
|
||||
From a57132816ac7bd93d6875fee0a6c5b273177ac8d Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 30 Sep 2015 12:51:24 -0400
|
||||
Subject: [PATCH 1/3] authPrompt: don't fade out auth messages if user types
|
||||
password up front
|
||||
|
||||
Right now we fade out any stale auth messages as soon as the user starts
|
||||
typing. This behavior doesn't really make sense if the user is typing up
|
||||
front, before a password is asked.
|
||||
---
|
||||
js/gdm/authPrompt.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index d7f53a92e..d421a8856 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -169,7 +169,7 @@ var AuthPrompt = class {
|
||||
this._updateNextButtonSensitivity(this._entry.text.length > 0);
|
||||
|
||||
this._entry.clutter_text.connect('text-changed', () => {
|
||||
- if (!this._userVerifier.hasPendingMessages)
|
||||
+ if (!this._userVerifier.hasPendingMessages && this._queryingService && !this._preemptiveAnswer)
|
||||
this._fadeOutMessage();
|
||||
|
||||
this._updateNextButtonSensitivity(this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING);
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 50af703ea95f2b73733c38e66c9c251663a51744 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 30 Sep 2015 14:36:33 -0400
|
||||
Subject: [PATCH 2/3] authPrompt: don't spin unless answering question
|
||||
|
||||
---
|
||||
js/gdm/authPrompt.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index d421a8856..62c5bd078 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -60,8 +60,8 @@ var AuthPrompt = class {
|
||||
|
||||
this.connect('next', () => {
|
||||
this.updateSensitivity(false);
|
||||
- this.startSpinning();
|
||||
if (this._queryingService) {
|
||||
+ this.startSpinning();
|
||||
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
||||
} else {
|
||||
this._preemptiveAnswer = this._entry.text;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From b89be880936ad9dd145eb43890ac72d03c37785d Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 5 Oct 2015 15:26:18 -0400
|
||||
Subject: [PATCH 3/3] authPrompt: stop accepting preemptive answer if user
|
||||
stops typing
|
||||
|
||||
We only want to allow the user to type the preemptive password in
|
||||
one smooth motion. If they start to type, and then stop typing,
|
||||
we should discard their preemptive password as expired.
|
||||
|
||||
Typing ahead the password is just a convenience for users who don't
|
||||
want to manually lift the shift before typing their passwords, after
|
||||
all.
|
||||
---
|
||||
js/gdm/authPrompt.js | 37 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index 62c5bd078..27eb31a89 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -6,6 +6,7 @@ const Signals = imports.signals;
|
||||
const Animation = imports.ui.animation;
|
||||
const Batch = imports.gdm.batch;
|
||||
const GdmUtil = imports.gdm.util;
|
||||
+const Meta = imports.gi.Meta;
|
||||
const Params = imports.misc.params;
|
||||
const ShellEntry = imports.ui.shellEntry;
|
||||
const Tweener = imports.ui.tweener;
|
||||
@@ -41,6 +42,8 @@ var AuthPrompt = class {
|
||||
this._gdmClient = gdmClient;
|
||||
this._mode = mode;
|
||||
|
||||
+ this._idleMonitor = Meta.IdleMonitor.get_core();
|
||||
+
|
||||
let reauthenticationOnly;
|
||||
if (this._mode == AuthPromptMode.UNLOCK_ONLY)
|
||||
reauthenticationOnly = true;
|
||||
@@ -65,6 +68,11 @@ var AuthPrompt = class {
|
||||
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
||||
} else {
|
||||
this._preemptiveAnswer = this._entry.text;
|
||||
+
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
}
|
||||
});
|
||||
|
||||
@@ -128,6 +136,11 @@ var AuthPrompt = class {
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
+
|
||||
this._userVerifier.destroy();
|
||||
this._userVerifier = null;
|
||||
}
|
||||
@@ -342,6 +355,11 @@ var AuthPrompt = class {
|
||||
}
|
||||
|
||||
setQuestion(question) {
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+ }
|
||||
+
|
||||
this._label.set_text(question);
|
||||
|
||||
this._label.show();
|
||||
@@ -427,6 +445,19 @@ var AuthPrompt = class {
|
||||
}
|
||||
}
|
||||
|
||||
+ _onUserStoppedTypePreemptiveAnswer() {
|
||||
+ if (!this._preemptiveAnswerWatchId ||
|
||||
+ this._preemptiveAnswer ||
|
||||
+ this._queryingService)
|
||||
+ return;
|
||||
+
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ this._preemptiveAnswerWatchId = 0;
|
||||
+
|
||||
+ this._entry.text = '';
|
||||
+ this.updateSensitivity(false);
|
||||
+ }
|
||||
+
|
||||
reset() {
|
||||
let oldStatus = this.verificationStatus;
|
||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||
@@ -434,6 +465,12 @@ var AuthPrompt = class {
|
||||
this.nextButton.label = _("Next");
|
||||
this._preemptiveAnswer = null;
|
||||
|
||||
+ if (this._preemptiveAnswerWatchId) {
|
||||
+ this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
|
||||
+ }
|
||||
+ this._preemptiveAnswerWatchId = this._idleMonitor.add_idle_watch (500,
|
||||
+ this._onUserStoppedTypePreemptiveAnswer.bind(this));
|
||||
+
|
||||
if (this._userVerifier)
|
||||
this._userVerifier.cancel();
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
114
SOURCES/enforce-smartcard-at-unlock.patch
Normal file
114
SOURCES/enforce-smartcard-at-unlock.patch
Normal file
@ -0,0 +1,114 @@
|
||||
From 8ce91c85fe052d1a9f4fed0743bceae7d9654aa0 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 10:57:02 -0400
|
||||
Subject: [PATCH 1/3] smartcardManager: add way to detect if user logged using
|
||||
(any) token
|
||||
|
||||
If a user uses a token at login time, we need to make sure they continue
|
||||
to use the token at unlock time.
|
||||
|
||||
As a prerequisite for addressing that problem we need to know up front
|
||||
if a user logged in with a token at all.
|
||||
|
||||
This commit adds the necessary api to detect that case.
|
||||
---
|
||||
js/misc/smartcardManager.js | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/js/misc/smartcardManager.js b/js/misc/smartcardManager.js
|
||||
index fda782d1e..bb43c96e7 100644
|
||||
--- a/js/misc/smartcardManager.js
|
||||
+++ b/js/misc/smartcardManager.js
|
||||
@@ -112,5 +112,12 @@ var SmartcardManager = class {
|
||||
return true;
|
||||
}
|
||||
|
||||
+ loggedInWithToken() {
|
||||
+ if (this._loginToken)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
};
|
||||
Signals.addSignalMethods(SmartcardManager.prototype);
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 6decf5560d309579760e10048533d3bd9bc56c3c Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 19:56:53 -0400
|
||||
Subject: [PATCH 2/3] gdm: only unlock with smartcard, if smartcard used for
|
||||
login
|
||||
|
||||
If a smartcard is used for login, we need to make sure the smartcard
|
||||
gets used for unlock, too.
|
||||
---
|
||||
js/gdm/util.js | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index 2e9935250..2b80e1dd9 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -126,7 +126,6 @@ var ShellUserVerifier = class {
|
||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||
this._settings.connect('changed',
|
||||
this._updateDefaultService.bind(this));
|
||||
- this._updateDefaultService();
|
||||
|
||||
this._fprintManager = Fprint.FprintManager();
|
||||
this._smartcardManager = SmartcardManager.getSmartcardManager();
|
||||
@@ -138,6 +137,8 @@ var ShellUserVerifier = class {
|
||||
this.smartcardDetected = false;
|
||||
this._checkForSmartcard();
|
||||
|
||||
+ this._updateDefaultService();
|
||||
+
|
||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||
this._checkForSmartcard.bind(this));
|
||||
this._smartcardRemovedId = this._smartcardManager.connect('smartcard-removed',
|
||||
@@ -407,7 +408,9 @@ var ShellUserVerifier = class {
|
||||
}
|
||||
|
||||
_updateDefaultService() {
|
||||
- if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
+ if (this._smartcardManager.loggedInWithToken())
|
||||
+ this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
+ else if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
||||
this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From dd844c98c3450dd1b21bcc580b51162c1b00ed2a Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 28 Sep 2015 19:57:36 -0400
|
||||
Subject: [PATCH 3/3] gdm: update default service when smartcard inserted
|
||||
|
||||
Early on at start up we may not know if a smartcard is
|
||||
available. Make sure we reupdate the default service
|
||||
after we get a smartcard insertion event.
|
||||
---
|
||||
js/gdm/util.js | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
||||
index 2b80e1dd9..6e940d2ab 100644
|
||||
--- a/js/gdm/util.js
|
||||
+++ b/js/gdm/util.js
|
||||
@@ -327,6 +327,8 @@ var ShellUserVerifier = class {
|
||||
else if (this._preemptingService == SMARTCARD_SERVICE_NAME)
|
||||
this._preemptingService = null;
|
||||
|
||||
+ this._updateDefaultService();
|
||||
+
|
||||
this.emit('smartcard-status-changed');
|
||||
}
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
224
SOURCES/fix-invalid-access-warnings.patch
Normal file
224
SOURCES/fix-invalid-access-warnings.patch
Normal file
@ -0,0 +1,224 @@
|
||||
From 76eebb42ed4c76970a9debfc0cd41537923eccde Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Tue, 5 Dec 2017 02:41:50 +0100
|
||||
Subject: [PATCH 1/2] tweener: Save handlers on target and remove them on
|
||||
destroy
|
||||
|
||||
Saving handlers we had using the wrapper as a property of the object and delete
|
||||
them when resetting the object state.
|
||||
Without doing this an handler could be called on a destroyed target when this
|
||||
happens on the onComplete callback.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=791233
|
||||
---
|
||||
js/ui/tweener.js | 63 ++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 50 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/js/ui/tweener.js b/js/ui/tweener.js
|
||||
index bb9ea557c..c04cede25 100644
|
||||
--- a/js/ui/tweener.js
|
||||
+++ b/js/ui/tweener.js
|
||||
@@ -63,30 +63,67 @@ function _getTweenState(target) {
|
||||
return target.__ShellTweenerState;
|
||||
}
|
||||
|
||||
+function _ensureHandlers(target) {
|
||||
+ if (!target.__ShellTweenerHandlers)
|
||||
+ target.__ShellTweenerHandlers = {};
|
||||
+ return target.__ShellTweenerHandlers;
|
||||
+}
|
||||
+
|
||||
function _resetTweenState(target) {
|
||||
let state = target.__ShellTweenerState;
|
||||
|
||||
if (state) {
|
||||
- if (state.destroyedId)
|
||||
+ if (state.destroyedId) {
|
||||
state.actor.disconnect(state.destroyedId);
|
||||
+ delete state.destroyedId;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ _removeHandler(target, 'onComplete', _tweenCompleted);
|
||||
target.__ShellTweenerState = {};
|
||||
}
|
||||
|
||||
function _addHandler(target, params, name, handler) {
|
||||
- if (params[name]) {
|
||||
- let oldHandler = params[name];
|
||||
- let oldScope = params[name + 'Scope'];
|
||||
- let oldParams = params[name + 'Params'];
|
||||
- let eventScope = oldScope ? oldScope : target;
|
||||
-
|
||||
- params[name] = () => {
|
||||
- oldHandler.apply(eventScope, oldParams);
|
||||
- handler(target);
|
||||
- };
|
||||
- } else
|
||||
- params[name] = () => { handler(target); };
|
||||
+ let wrapperNeeded = false;
|
||||
+ let tweenerHandlers = _ensureHandlers(target);
|
||||
+
|
||||
+ if (!(name in tweenerHandlers)) {
|
||||
+ tweenerHandlers[name] = [];
|
||||
+ wrapperNeeded = true;
|
||||
+ }
|
||||
+
|
||||
+ let handlers = tweenerHandlers[name];
|
||||
+ handlers.push(handler);
|
||||
+
|
||||
+ if (wrapperNeeded) {
|
||||
+ if (params[name]) {
|
||||
+ let oldHandler = params[name];
|
||||
+ let oldScope = params[name + 'Scope'];
|
||||
+ let oldParams = params[name + 'Params'];
|
||||
+ let eventScope = oldScope ? oldScope : target;
|
||||
+
|
||||
+ params[name] = () => {
|
||||
+ oldHandler.apply(eventScope, oldParams);
|
||||
+ handlers.forEach((h) => h(target));
|
||||
+ };
|
||||
+ } else {
|
||||
+ params[name] = () => { handlers.forEach((h) => h(target)); };
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+function _removeHandler(target, name, handler) {
|
||||
+ let tweenerHandlers = _ensureHandlers(target);
|
||||
+
|
||||
+ if (name in tweenerHandlers) {
|
||||
+ let handlers = tweenerHandlers[name];
|
||||
+ let handlerIndex = handlers.indexOf(handler);
|
||||
+
|
||||
+ while (handlerIndex > -1) {
|
||||
+ handlers.splice(handlerIndex, 1);
|
||||
+ handlerIndex = handlers.indexOf(handler);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
function _actorDestroyed(target) {
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 730f6f7d708a0cbcfcc75e4a1fba8512ac7c4c82 Mon Sep 17 00:00:00 2001
|
||||
From: Cosimo Cecchi <cosimo@endlessm.com>
|
||||
Date: Sun, 26 May 2019 08:31:07 -0700
|
||||
Subject: [PATCH 2/2] windowAttentionHandler: disconnect signals before
|
||||
destruction
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The 'destroy' signal is emitted at the end of the destroy() method.
|
||||
However the implementation of destroy() can end up emitting one of the
|
||||
signals we connect to on the window, causing us to re-enter destroy
|
||||
from its callback.
|
||||
That will in turn lead to some objects getting disposed twice, which
|
||||
produces a stack trace like the following one.
|
||||
|
||||
This commit fixes the issue by overriding the destroy() method instead
|
||||
of connecting to the signal, which allows us to disconnect the signal
|
||||
handlers from the window at an earlier time and avoid re-entrancy.
|
||||
|
||||
--
|
||||
|
||||
gnome-shell[1082]: Object Gio.Settings (0x7f0af8143f00), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
|
||||
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
|
||||
org.gnome.Shell.desktop[1082]: #0 5627f9e801a8 i resource:///org/gnome/shell/ui/messageTray.js:238 (7f0aefa9eca0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #1 5627f9e80108 i resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
|
||||
org.gnome.Shell.desktop[1082]: #2 5627f9e80070 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
|
||||
org.gnome.Shell.desktop[1082]: #3 7fffa69fbfc0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
org.gnome.Shell.desktop[1082]: #4 5627f9e7ffe0 i resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
|
||||
org.gnome.Shell.desktop[1082]: #5 5627f9e7ff38 i resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #6 5627f9e7fe80 i resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
|
||||
org.gnome.Shell.desktop[1082]: #7 5627f9e7fde8 i resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
|
||||
org.gnome.Shell.desktop[1082]: #8 7fffa69ff8e0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
org.gnome.Shell.desktop[1082]: #9 7fffa69ff9d0 b resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
|
||||
org.gnome.Shell.desktop[1082]: #10 5627f9e7fd58 i resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
|
||||
org.gnome.Shell.desktop[1082]: #11 5627f9e7fcb8 i resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
|
||||
org.gnome.Shell.desktop[1082]: #12 5627f9e7fc28 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
|
||||
org.gnome.Shell.desktop[1082]: #13 5627f9e7fb80 i resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
|
||||
org.gnome.Shell.desktop[1082]: #14 5627f9e7fad0 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
|
||||
org.gnome.Shell.desktop[1082]: #15 5627f9e7fa58 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
|
||||
org.gnome.Shell.desktop[1082]: #16 7fffa6a03350 b resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
|
||||
org.gnome.Shell.desktop[1082]: #17 5627f9e7f9d0 i resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #18 5627f9e7f950 i resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #19 7fffa6a048f0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
|
||||
org.gnome.Shell.desktop[1082]: #0 5627f9e801a8 i resource:///org/gnome/shell/ui/messageTray.js:239 (7f0aefa9eca0 @ 42)
|
||||
org.gnome.Shell.desktop[1082]: #1 5627f9e80108 i resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
|
||||
org.gnome.Shell.desktop[1082]: #2 5627f9e80070 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
|
||||
org.gnome.Shell.desktop[1082]: #3 7fffa69fbfc0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
org.gnome.Shell.desktop[1082]: #4 5627f9e7ffe0 i resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
|
||||
org.gnome.Shell.desktop[1082]: #5 5627f9e7ff38 i resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #6 5627f9e7fe80 i resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
|
||||
org.gnome.Shell.desktop[1082]: #7 5627f9e7fde8 i resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
|
||||
org.gnome.Shell.desktop[1082]: #8 7fffa69ff8e0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
org.gnome.Shell.desktop[1082]: #9 7fffa69ff9d0 b resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
|
||||
org.gnome.Shell.desktop[1082]: #10 5627f9e7fd58 i resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
|
||||
org.gnome.Shell.desktop[1082]: #11 5627f9e7fcb8 i resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
|
||||
org.gnome.Shell.desktop[1082]: #12 5627f9e7fc28 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
|
||||
org.gnome.Shell.desktop[1082]: #13 5627f9e7fb80 i resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
|
||||
org.gnome.Shell.desktop[1082]: #14 5627f9e7fad0 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
|
||||
org.gnome.Shell.desktop[1082]: #15 5627f9e7fa58 i resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
|
||||
org.gnome.Shell.desktop[1082]: #16 7fffa6a03350 b resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
|
||||
org.gnome.Shell.desktop[1082]: #17 5627f9e7f9d0 i resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #18 5627f9e7f950 i resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
|
||||
org.gnome.Shell.desktop[1082]: #19 7fffa6a048f0 b self-hosted:979 (7f0aefa515e0 @ 440)
|
||||
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
|
||||
gnome-shell[1082]: Object Gio.Settings (0x7f0af8161750), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
|
||||
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
|
||||
---
|
||||
js/ui/windowAttentionHandler.js | 17 ++++++++---------
|
||||
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js
|
||||
index abdb8a444..a9a7111ba 100644
|
||||
--- a/js/ui/windowAttentionHandler.js
|
||||
+++ b/js/ui/windowAttentionHandler.js
|
||||
@@ -69,8 +69,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
|
||||
() => { this.destroy(); }));
|
||||
this.signalIDs.push(this._window.connect('unmanaged',
|
||||
() => { this.destroy(); }));
|
||||
-
|
||||
- this.connect('destroy', this._onDestroy.bind(this));
|
||||
}
|
||||
|
||||
_sync() {
|
||||
@@ -79,13 +77,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
- _onDestroy() {
|
||||
- for(let i = 0; i < this.signalIDs.length; i++) {
|
||||
- this._window.disconnect(this.signalIDs[i]);
|
||||
- }
|
||||
- this.signalIDs = [];
|
||||
- }
|
||||
-
|
||||
_createPolicy() {
|
||||
if (this._app && this._app.get_app_info()) {
|
||||
let id = this._app.get_id().replace(/\.desktop$/,'');
|
||||
@@ -99,6 +90,14 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
|
||||
return this._app.create_icon_texture(size);
|
||||
}
|
||||
|
||||
+ destroy(params) {
|
||||
+ for (let i = 0; i < this.signalIDs.length; i++)
|
||||
+ this._window.disconnect(this.signalIDs[i]);
|
||||
+ this.signalIDs = [];
|
||||
+
|
||||
+ super.destroy(params);
|
||||
+ }
|
||||
+
|
||||
open() {
|
||||
Main.activateWindow(this._window);
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
38
SOURCES/gnome-shell-favourite-apps-firefox.patch
Normal file
38
SOURCES/gnome-shell-favourite-apps-firefox.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 87104647f061892525236a71f304b63609960626 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 9 Mar 2017 14:43:30 +0100
|
||||
Subject: [PATCH] appFavorites: Make firefox the default browser
|
||||
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
js/ui/appFavorites.js | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index 24e2a75b0..2f50036d0 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -39,7 +39,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'epiphany.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
|
||||
index 657e15965..1e44a1655 100644
|
||||
--- a/js/ui/appFavorites.js
|
||||
+++ b/js/ui/appFavorites.js
|
||||
@@ -49,6 +49,7 @@ const RENAMED_DESKTOP_IDS = {
|
||||
'gnotski.desktop': 'org.gnome.Klotski.desktop',
|
||||
'gtali.desktop': 'org.gnome.Tali.desktop',
|
||||
'iagno.desktop': 'org.gnome.Reversi.desktop',
|
||||
+ 'mozilla-firefox.desktop': 'firefox.desktop',
|
||||
'nautilus.desktop': 'org.gnome.Nautilus.desktop',
|
||||
'org.gnome.gnome-2048.desktop': 'org.gnome.TwentyFortyEight.desktop',
|
||||
'org.gnome.taquin.desktop': 'org.gnome.Taquin.desktop',
|
||||
--
|
||||
2.21.0
|
||||
|
25
SOURCES/gnome-shell-favourite-apps-terminal.patch
Normal file
25
SOURCES/gnome-shell-favourite-apps-terminal.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From d15a92aeaa075230f711921f4bcd929c49bfc97d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 9 Mar 2017 14:44:32 +0100
|
||||
Subject: [PATCH] appFavorites: Add terminal
|
||||
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index 40526187e..9d7e011fc 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -39,7 +39,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop', 'gnome-terminal.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
--
|
||||
2.21.0
|
||||
|
26
SOURCES/gnome-shell-favourite-apps-yelp.patch
Normal file
26
SOURCES/gnome-shell-favourite-apps-yelp.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 53eba56c29c2c3f25bdfc4b73d1b9ce74ce2504b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 9 Mar 2017 14:44:03 +0100
|
||||
Subject: [PATCH] Add 'yelp' to default favorites
|
||||
|
||||
Help should be easily available, so add it to the default favorites.
|
||||
---
|
||||
data/org.gnome.shell.gschema.xml.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in
|
||||
index 2f50036d0..40526187e 100644
|
||||
--- a/data/org.gnome.shell.gschema.xml.in
|
||||
+++ b/data/org.gnome.shell.gschema.xml.in
|
||||
@@ -39,7 +39,7 @@
|
||||
</description>
|
||||
</key>
|
||||
<key name="favorite-apps" type="as">
|
||||
- <default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
|
||||
+ <default>[ 'firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop' ]</default>
|
||||
<summary>List of desktop file IDs for favorite applications</summary>
|
||||
<description>
|
||||
The applications corresponding to these identifiers
|
||||
--
|
||||
2.21.0
|
||||
|
399
SOURCES/horizontal-workspace-support.patch
Normal file
399
SOURCES/horizontal-workspace-support.patch
Normal file
@ -0,0 +1,399 @@
|
||||
From b42dd3f87ad5fb6c7ee139cb0de22e0fbb393ba2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 4 Jun 2019 19:22:26 +0000
|
||||
Subject: [PATCH 1/2] workspaceSwitcherPopup: Support horizontal layout
|
||||
|
||||
While mutter supports a variety of different grid layouts (n columns/rows,
|
||||
growing vertically or horizontally from any of the four corners), we
|
||||
hardcode a fixed vertical layout of a single column.
|
||||
|
||||
Now that mutter exposes the actual layout to us, add support for a more
|
||||
traditional horizontal layout as well.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/575
|
||||
---
|
||||
data/theme/gnome-shell-sass/_common.scss | 3 +-
|
||||
js/ui/windowManager.js | 36 ++++++++--
|
||||
js/ui/workspaceSwitcherPopup.js | 86 ++++++++++++++++++------
|
||||
3 files changed, 98 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
|
||||
index 293ea2ab9..b1eeb0ce9 100644
|
||||
--- a/data/theme/gnome-shell-sass/_common.scss
|
||||
+++ b/data/theme/gnome-shell-sass/_common.scss
|
||||
@@ -680,7 +680,8 @@ StScrollBar {
|
||||
spacing: 8px;
|
||||
}
|
||||
|
||||
- .ws-switcher-active-up, .ws-switcher-active-down {
|
||||
+ .ws-switcher-active-up, .ws-switcher-active-down,
|
||||
+ .ws-switcher-active-left, .ws-switcher-active-right {
|
||||
height: 50px;
|
||||
background-color: $selected_bg_color;
|
||||
color: $selected_fg_color;
|
||||
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
|
||||
index b9f5fef46..dfe1b4460 100644
|
||||
--- a/js/ui/windowManager.js
|
||||
+++ b/js/ui/windowManager.js
|
||||
@@ -2145,6 +2145,8 @@ var WindowManager = class {
|
||||
let [action,,,target] = binding.get_name().split('-');
|
||||
let newWs;
|
||||
let direction;
|
||||
+ let vertical = workspaceManager.layout_rows == -1;
|
||||
+ let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
||||
|
||||
if (action == 'move') {
|
||||
// "Moving" a window to another workspace doesn't make sense when
|
||||
@@ -2157,7 +2159,12 @@ var WindowManager = class {
|
||||
}
|
||||
|
||||
if (target == 'last') {
|
||||
- direction = Meta.MotionDirection.DOWN;
|
||||
+ if (vertical)
|
||||
+ direction = Meta.MotionDirection.DOWN;
|
||||
+ else if (rtl)
|
||||
+ direction = Meta.MotionDirection.LEFT;
|
||||
+ else
|
||||
+ direction = Meta.MotionDirection.RIGHT;
|
||||
newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
|
||||
} else if (isNaN(target)) {
|
||||
// Prepend a new workspace dynamically
|
||||
@@ -2173,16 +2180,33 @@ var WindowManager = class {
|
||||
target--;
|
||||
newWs = workspaceManager.get_workspace_by_index(target);
|
||||
|
||||
- if (workspaceManager.get_active_workspace().index() > target)
|
||||
- direction = Meta.MotionDirection.UP;
|
||||
- else
|
||||
- direction = Meta.MotionDirection.DOWN;
|
||||
+ if (workspaceManager.get_active_workspace().index() > target) {
|
||||
+ if (vertical)
|
||||
+ direction = Meta.MotionDirection.UP;
|
||||
+ else if (rtl)
|
||||
+ direction = Meta.MotionDirection.RIGHT;
|
||||
+ else
|
||||
+ direction = Meta.MotionDirection.LEFT;
|
||||
+ } else {
|
||||
+ if (vertical)
|
||||
+ direction = Meta.MotionDirection.DOWN;
|
||||
+ else if (rtl)
|
||||
+ direction = Meta.MotionDirection.LEFT;
|
||||
+ else
|
||||
+ direction = Meta.MotionDirection.RIGHT;
|
||||
+ }
|
||||
}
|
||||
|
||||
- if (direction != Meta.MotionDirection.UP &&
|
||||
+ if (workspaceManager.layout_rows == -1 &&
|
||||
+ direction != Meta.MotionDirection.UP &&
|
||||
direction != Meta.MotionDirection.DOWN)
|
||||
return;
|
||||
|
||||
+ if (workspaceManager.layout_columns == -1 &&
|
||||
+ direction != Meta.MotionDirection.LEFT &&
|
||||
+ direction != Meta.MotionDirection.RIGHT)
|
||||
+ return;
|
||||
+
|
||||
if (action == 'switch')
|
||||
this.actionMoveWorkspace(newWs);
|
||||
else
|
||||
diff --git a/js/ui/workspaceSwitcherPopup.js b/js/ui/workspaceSwitcherPopup.js
|
||||
index 26404eaab..d21c5de4d 100644
|
||||
--- a/js/ui/workspaceSwitcherPopup.js
|
||||
+++ b/js/ui/workspaceSwitcherPopup.js
|
||||
@@ -17,41 +17,75 @@ class WorkspaceSwitcherPopupList extends St.Widget {
|
||||
this._itemSpacing = 0;
|
||||
this._childHeight = 0;
|
||||
this._childWidth = 0;
|
||||
+ this._orientation = global.workspace_manager.layout_rows == -1
|
||||
+ ? Clutter.Orientation.VERTICAL
|
||||
+ : Clutter.Orientation.HORIZONTAL;
|
||||
|
||||
this.connect('style-changed', () => {
|
||||
this._itemSpacing = this.get_theme_node().get_length('spacing');
|
||||
});
|
||||
}
|
||||
|
||||
- vfunc_get_preferred_height(forWidth) {
|
||||
+ _getPreferredSizeForOrientation(forSize) {
|
||||
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
|
||||
let themeNode = this.get_theme_node();
|
||||
|
||||
- let availHeight = workArea.height;
|
||||
- availHeight -= themeNode.get_vertical_padding();
|
||||
+ let availSize;
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL)
|
||||
+ availSize = workArea.width - themeNode.get_horizontal_padding();
|
||||
+ else
|
||||
+ availSize = workArea.height - themeNode.get_vertical_padding();
|
||||
|
||||
- let height = 0;
|
||||
+ let size = 0;
|
||||
for (let child of this.get_children()) {
|
||||
let [childMinHeight, childNaturalHeight] = child.get_preferred_height(-1);
|
||||
- let [childMinWidth, childNaturalWidth] = child.get_preferred_width(childNaturalHeight);
|
||||
- height += childNaturalHeight * workArea.width / workArea.height;
|
||||
+ let height = childNaturalHeight * workArea.width / workArea.height;
|
||||
+
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL) {
|
||||
+ size += height * workArea.width / workArea.height;
|
||||
+ } else {
|
||||
+ size += height;
|
||||
+ }
|
||||
}
|
||||
|
||||
let workspaceManager = global.workspace_manager;
|
||||
let spacing = this._itemSpacing * (workspaceManager.n_workspaces - 1);
|
||||
- height += spacing;
|
||||
- height = Math.min(height, availHeight);
|
||||
+ size += spacing;
|
||||
+ size = Math.min(size, availSize);
|
||||
+
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL) {
|
||||
+ this._childWidth = (size - spacing) / workspaceManager.n_workspaces;
|
||||
+ return themeNode.adjust_preferred_width(size, size);
|
||||
+ } else {
|
||||
+ this._childHeight = (size - spacing) / workspaceManager.n_workspaces;
|
||||
+ return themeNode.adjust_preferred_height(size, size);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ _getSizeForOppositeOrientation() {
|
||||
+ let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
|
||||
|
||||
- this._childHeight = (height - spacing) / workspaceManager.n_workspaces;
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL) {
|
||||
+ this._childHeight = Math.round(this._childWidth * workArea.height / workArea.width);
|
||||
+ return [this._childHeight, this._childHeight];
|
||||
+ } else {
|
||||
+ this._childWidth = Math.round(this._childHeight * workArea.width / workArea.height);
|
||||
+ return [this._childWidth, this._childWidth];
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- return themeNode.adjust_preferred_height(height, height);
|
||||
+ vfunc_get_preferred_height(forWidth) {
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL)
|
||||
+ return this._getSizeForOppositeOrientation();
|
||||
+ else
|
||||
+ return this._getPreferredSizeForOrientation(forWidth);
|
||||
}
|
||||
|
||||
vfunc_get_preferred_width(forHeight) {
|
||||
- let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
|
||||
- this._childWidth = Math.round(this._childHeight * workArea.width / workArea.height);
|
||||
-
|
||||
- return [this._childWidth, this._childWidth];
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL)
|
||||
+ return this._getPreferredSizeForOrientation(forHeight);
|
||||
+ else
|
||||
+ return this._getSizeForOppositeOrientation();
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
@@ -62,15 +96,23 @@ class WorkspaceSwitcherPopupList extends St.Widget {
|
||||
|
||||
let childBox = new Clutter.ActorBox();
|
||||
|
||||
+ let rtl = this.text_direction == Clutter.TextDirection.RTL;
|
||||
+ let x = rtl ? box.x2 - this._childWidth : box.x1;
|
||||
let y = box.y1;
|
||||
- let prevChildBoxY2 = box.y1 - this._itemSpacing;
|
||||
for (let child of this.get_children()) {
|
||||
- childBox.x1 = box.x1;
|
||||
- childBox.x2 = box.x1 + this._childWidth;
|
||||
- childBox.y1 = prevChildBoxY2 + this._itemSpacing;
|
||||
+ childBox.x1 = Math.round(x);
|
||||
+ childBox.x2 = Math.round(x + this._childWidth);
|
||||
+ childBox.y1 = Math.round(y);
|
||||
childBox.y2 = Math.round(y + this._childHeight);
|
||||
- y += this._childHeight + this._itemSpacing;
|
||||
- prevChildBoxY2 = childBox.y2;
|
||||
+
|
||||
+ if (this._orientation == Clutter.Orientation.HORIZONTAL) {
|
||||
+ if (rtl)
|
||||
+ x -= this._childWidth + this._itemSpacing;
|
||||
+ else
|
||||
+ x += this._childWidth + this._itemSpacing;
|
||||
+ } else {
|
||||
+ y += this._childHeight + this._itemSpacing;
|
||||
+ }
|
||||
child.allocate(childBox, flags);
|
||||
}
|
||||
}
|
||||
@@ -123,6 +165,10 @@ class WorkspaceSwitcherPopup extends St.Widget {
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-active-up' });
|
||||
else if(i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN)
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-active-down' });
|
||||
+ else if(i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.LEFT)
|
||||
+ indicator = new St.Bin({ style_class: 'ws-switcher-active-left' });
|
||||
+ else if(i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.RIGHT)
|
||||
+ indicator = new St.Bin({ style_class: 'ws-switcher-active-right' });
|
||||
else
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-box' });
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 813976ff69b15ab884d44f5f6a56ae66f407acfd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Tue, 4 Jun 2019 19:49:23 +0000
|
||||
Subject: [PATCH 2/2] workspacesView: Support horizontal layout
|
||||
|
||||
Just as we did for the workspace switcher popup, support workspaces
|
||||
being laid out in a single row in the window picker.
|
||||
|
||||
Note that this takes care of the various workspace switch actions in
|
||||
the overview (scrolling, panning, touch(pad) gestures) as well as the
|
||||
switch animation, but not of the overview's workspace switcher component.
|
||||
|
||||
There are currently no plans to support other layouts there, as the
|
||||
component is inherently vertical (in fact, it was the whole reason for
|
||||
switching the layout in the first place).
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/575
|
||||
---
|
||||
js/ui/workspacesView.js | 81 ++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 60 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
|
||||
index fe06d9dae..069937d5a 100644
|
||||
--- a/js/ui/workspacesView.js
|
||||
+++ b/js/ui/workspacesView.js
|
||||
@@ -181,26 +181,32 @@ var WorkspacesView = class extends WorkspacesViewBase {
|
||||
|
||||
Tweener.removeTweens(workspace.actor);
|
||||
|
||||
- let y = (w - active) * this._fullGeometry.height;
|
||||
+ let params = {};
|
||||
+ if (workspaceManager.layout_rows == -1)
|
||||
+ params.y = (w - active) * this._fullGeometry.height;
|
||||
+ else if (this.actor.text_direction == Clutter.TextDirection.RTL)
|
||||
+ params.x = (active - w) * this._fullGeometry.width;
|
||||
+ else
|
||||
+ params.x = (w - active) * this._fullGeometry.width;
|
||||
|
||||
if (showAnimation) {
|
||||
- let params = { y: y,
|
||||
- time: WORKSPACE_SWITCH_TIME,
|
||||
- transition: 'easeOutQuad'
|
||||
- };
|
||||
+ let tweenParams = Object.assign(params, {
|
||||
+ time: WORKSPACE_SWITCH_TIME,
|
||||
+ transition: 'easeOutQuad'
|
||||
+ });
|
||||
// we have to call _updateVisibility() once before the
|
||||
// animation and once afterwards - it does not really
|
||||
// matter which tween we use, so we pick the first one ...
|
||||
if (w == 0) {
|
||||
this._updateVisibility();
|
||||
- params.onComplete = () => {
|
||||
+ tweenParams.onComplete = () => {
|
||||
this._animating = false;
|
||||
this._updateVisibility();
|
||||
};
|
||||
}
|
||||
- Tweener.addTween(workspace.actor, params);
|
||||
+ Tweener.addTween(workspace.actor, tweenParams);
|
||||
} else {
|
||||
- workspace.actor.set_position(0, y);
|
||||
+ workspace.actor.set(params);
|
||||
if (w == 0)
|
||||
this._updateVisibility();
|
||||
}
|
||||
@@ -338,22 +344,39 @@ var WorkspacesView = class extends WorkspacesViewBase {
|
||||
metaWorkspace.activate(global.get_current_time());
|
||||
}
|
||||
|
||||
- let last = this._workspaces.length - 1;
|
||||
- let firstWorkspaceY = this._workspaces[0].actor.y;
|
||||
- let lastWorkspaceY = this._workspaces[last].actor.y;
|
||||
- let workspacesHeight = lastWorkspaceY - firstWorkspaceY;
|
||||
-
|
||||
if (adj.upper == 1)
|
||||
return;
|
||||
|
||||
- let currentY = firstWorkspaceY;
|
||||
- let newY = - adj.value / (adj.upper - 1) * workspacesHeight;
|
||||
+ let last = this._workspaces.length - 1;
|
||||
+
|
||||
+ if (workspaceManager.layout_rows == -1) {
|
||||
+ let firstWorkspaceY = this._workspaces[0].actor.y;
|
||||
+ let lastWorkspaceY = this._workspaces[last].actor.y;
|
||||
+ let workspacesHeight = lastWorkspaceY - firstWorkspaceY;
|
||||
+
|
||||
+ let currentY = firstWorkspaceY;
|
||||
+ let newY = -adj.value / (adj.upper - 1) * workspacesHeight;
|
||||
|
||||
- let dy = newY - currentY;
|
||||
+ let dy = newY - currentY;
|
||||
+
|
||||
+ for (let i = 0; i < this._workspaces.length; i++) {
|
||||
+ this._workspaces[i].actor.visible = Math.abs(i - adj.value) <= 1;
|
||||
+ this._workspaces[i].actor.y += dy;
|
||||
+ }
|
||||
+ } else {
|
||||
+ let firstWorkspaceX = this._workspaces[0].actor.x;
|
||||
+ let lastWorkspaceX = this._workspaces[last].actor.x;
|
||||
+ let workspacesWidth = lastWorkspaceX - firstWorkspaceX;
|
||||
|
||||
- for (let i = 0; i < this._workspaces.length; i++) {
|
||||
- this._workspaces[i].actor.visible = Math.abs(i - adj.value) <= 1;
|
||||
- this._workspaces[i].actor.y += dy;
|
||||
+ let currentX = firstWorkspaceX;
|
||||
+ let newX = -adj.value / (adj.upper - 1) * workspacesWidth;
|
||||
+
|
||||
+ let dx = newX - currentX;
|
||||
+
|
||||
+ for (let i = 0; i < this._workspaces.length; i++) {
|
||||
+ this._workspaces[i].actor.visible = Math.abs(i - adj.value) <= 1;
|
||||
+ this._workspaces[i].actor.x += dx;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -504,7 +527,12 @@ var WorkspacesDisplay = class {
|
||||
_onPan(action) {
|
||||
let [dist, dx, dy] = action.get_motion_delta(0);
|
||||
let adjustment = this._scrollAdjustment;
|
||||
- adjustment.value -= (dy / this.actor.height) * adjustment.page_size;
|
||||
+ if (global.workspace_manager.layout_rows == -1)
|
||||
+ adjustment.value -= (dy / this.actor.height) * adjustment.page_size;
|
||||
+ else if (this.actor.text_direction == Clutter.TextDirection.RTL)
|
||||
+ adjustment.value += (dx / this.actor.width) * adjustment.page_size;
|
||||
+ else
|
||||
+ adjustment.value -= (dx / this.actor.width) * adjustment.page_size;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -536,7 +564,12 @@ var WorkspacesDisplay = class {
|
||||
let workspaceManager = global.workspace_manager;
|
||||
let active = workspaceManager.get_active_workspace_index();
|
||||
let adjustment = this._scrollAdjustment;
|
||||
- adjustment.value = (active - yRel / this.actor.height) * adjustment.page_size;
|
||||
+ if (workspaceManager.layout_rows == -1)
|
||||
+ adjustment.value = (active - yRel / this.actor.height) * adjustment.page_size;
|
||||
+ else if (this.actor.text_direction == Clutter.TextDirection.RTL)
|
||||
+ adjustment.value = (active + xRel / this.actor.width) * adjustment.page_size;
|
||||
+ else
|
||||
+ adjustment.value = (active - xRel / this.actor.width) * adjustment.page_size;
|
||||
}
|
||||
|
||||
_onSwitchWorkspaceActivated(action, direction) {
|
||||
@@ -755,6 +788,12 @@ var WorkspacesDisplay = class {
|
||||
case Clutter.ScrollDirection.DOWN:
|
||||
ws = activeWs.get_neighbor(Meta.MotionDirection.DOWN);
|
||||
break;
|
||||
+ case Clutter.ScrollDirection.LEFT:
|
||||
+ ws = activeWs.get_neighbor(Meta.MotionDirection.LEFT);
|
||||
+ break;
|
||||
+ case Clutter.ScrollDirection.RIGHT:
|
||||
+ ws = activeWs.get_neighbor(Meta.MotionDirection.RIGHT);
|
||||
+ break;
|
||||
default:
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
1240
SPECS/gnome-shell.spec
Normal file
1240
SPECS/gnome-shell.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user