Sync from SUSE:SLFO:Main gnome-shell revision 04d500e98e42bb95df7f0b2490ffed03

This commit is contained in:
Adrian Schröter 2024-05-03 13:02:07 +02:00
commit 443859101d
23 changed files with 10091 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,68 @@
From 521525948eed85cc27c0796a0b9569d161df81ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 7 Sep 2023 17:59:03 +0200
Subject: [PATCH 1/2] screenshot: Do not wrongly enable window button
The window button is disabled when
- there are no windows
- we are in screen-recording mode
- the session mode doesn't allow windows
However the last condition is only taken into account when
opening the dialog, but not when switching from recording-
to screenshot mode.
Address this by updating the button's sensitivity in a separate
function, so the different conditions are considered consistently.
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6990
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2944>
---
js/ui/screenshot.js | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
Index: gnome-shell-44.1/js/ui/screenshot.js
===================================================================
--- gnome-shell-44.1.orig/js/ui/screenshot.js
+++ gnome-shell-44.1/js/ui/screenshot.js
@@ -1377,6 +1377,16 @@ var ScreenshotUI = GObject.registerClass
this._castButton.reactive = Main.sessionMode.allowScreencast;
}
+ _syncWindowButtonSensitivity() {
+ const windows =
+ this._windowSelectors.flatMap(selector => selector.windows());
+
+ this._windowButton.reactive =
+ Main.sessionMode.hasWindows &&
+ windows.length > 0 &&
+ !this._castButton.checked;
+ }
+
_refreshButtonLayout() {
const buttonLayout = Meta.prefs_get_button_layout();
@@ -1493,10 +1503,7 @@ var ScreenshotUI = GObject.registerClass
});
}
- this._windowButton.reactive =
- Main.sessionMode.hasWindows &&
- windows.length > 0 &&
- !this._castButton.checked;
+ this._syncWindowButtonSensitivity();
if (!this._windowButton.reactive)
this._selectionButton.checked = true;
@@ -1739,9 +1746,7 @@ var ScreenshotUI = GObject.registerClass
this._captureButton.remove_style_pseudo_class('cast');
- const windows =
- this._windowSelectors.flatMap(selector => selector.windows());
- this._windowButton.reactive = windows.length > 0;
+ this._syncWindowButtonSensitivity();
}
}

View File

@ -0,0 +1,33 @@
From 671df28a509ae208e158976f0855d91fdbea16a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 7 Sep 2023 18:00:21 +0200
Subject: [PATCH 2/2] screenshot: Only handle mode-switch shortcut when
supported
We currently handle the 'v' key to switch between recording- and
screenshot mode regardless of whether screen recordings are
supported.
This is clearly wrong, don't do that.
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6990
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2944>
---
js/ui/screenshot.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: gnome-shell-44.1/js/ui/screenshot.js
===================================================================
--- gnome-shell-44.1.orig/js/ui/screenshot.js
+++ gnome-shell-44.1/js/ui/screenshot.js
@@ -2008,7 +2008,8 @@ var ScreenshotUI = GObject.registerClass
return Clutter.EVENT_STOP;
}
- if (symbol === Clutter.KEY_v || symbol === Clutter.KEY_V) {
+ if (this._castButton.reactive &&
+ (symbol === Clutter.KEY_v || symbol === Clutter.KEY_V)) {
this._castButton.checked = !this._castButton.checked;
return Clutter.EVENT_STOP;
}

19
_service Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/gnome-shell.git</param>
<param name="revision">refs/tags/44.1</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
<!-- <param name="changesgenerate">enable</param> -->
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual" />
</services>

135
aboutMenu.js Normal file
View File

@ -0,0 +1,135 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Clutter = imports.gi.Clutter;
const St = imports.gi.St;
const DBus = imports.gi.DBus;
const PanelMenu = imports.ui.panelMenu;
const HostnameIface = '<node> \
<interface name="org.freedesktop.DBus.Properties"> \
<method name="Get"> \
<arg type="s" direction="in" /> \
<arg type="s" direction="in" /> \
<arg type="v" direction="out" /> \
</method> \
</interface> \
</node>';
const HostnameProxy = Gio.DBusProxy.makeProxyWrapper(HostnameIface);
var AboutMenuButton = new Lang.Class({
Name: 'AboutMenuButton',
Extends: PanelMenu.Button,
_init: function() {
this._hostname = null;
this._updateHostnameId = 0;
this._ticket = 1;
let hbox;
let vbox;
let menuAlignment = 0.25;
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
menuAlignment = 1.0 - menuAlignment;
this.parent(menuAlignment, 'About Me');
this.about_hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
this.hostname_label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
this.about_hbox.add_child(this.hostname_label);
this.actor.add_child(this.about_hbox);
hbox = new St.BoxLayout({ name: 'aboutArea' });
this.menu.box.add_child(hbox);
vbox = new St.BoxLayout({vertical: true});
hbox.add(vbox);
///// Section: read '/etc/os-release' to get pretty name
//
// Note: previously this is defaulted to 'SUSE Linux Enterprise', now
// let's use a "safer" option.
let sysinfo_text = 'SUSE Linux';
try {
let success, contents, tag;
let _os_release = Gio.File.new_for_path('/etc/os-release');
[success, contents, tag] = _os_release.load_contents(null);
let osReleaseContentStr = contents.toString();
let prettyNameReg = /^PRETTY_NAME="(.+)"/;
let match = null;
for (let line of osReleaseContentStr.split('\n')) {
match = prettyNameReg.exec(line);
if (match) {
sysinfo_text = match[1];
}
}
}
catch (e) {
// NOTE soft fail, 'sysinfo_text' is the default
warn('ERROR: fail to read /etc/os-release');
}
this._sysinfo = new St.Label({ text: sysinfo_text, can_focus: true });
vbox.add(this._sysinfo);
this.actor.hide();
this._updateHostnameId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
this._ticket,
Lang.bind(this, function() {
if (this._ticket < 60*60)
this._ticket *= 2;
this._updateHostnameId = 0;
this._updateHostname();
return false;
}));
return;
},
_updateHostname: function(){
let hostname_text = get_hostname();
if ((this._hostname == null) || (this._hostname != hostname_text)) {
this._ticket = 1;
this._hostname = hostname_text;
this.hostname_label.set_text(this._hostname);
this.actor.show();
}
this._updateHostnameId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT,
this._ticket,
Lang.bind(this, function() {
if (this._ticket < 60*60)
this._ticket *= 2;
this._updateHostnameId = 0;
this._updateHostname();
return false;
}));
},
_destroy: function() {
this._ticket = 1;
if (this._updateHostnameId) {
GLib.source_remove (this._updateHostnameId);
this._updateHostnameId = 0;
}
},
});
function get_hostname() {
let hostnameProxy = HostnameProxy(Gio.DBus.system,
'org.freedesktop.hostname1',
'/org/freedesktop/hostname1',
null, null);
try {
let name = hostnameProxy.GetSync('org.freedesktop.hostname1', 'Hostname');
return name[0].get_string()[0];
} catch(e) {
return 'localhost';
}
}

View File

@ -0,0 +1,17 @@
Index: gnome-shell-3.24.2/js/ui/endSessionDialog.js
===================================================================
--- gnome-shell-3.24.2.orig/js/ui/endSessionDialog.js
+++ gnome-shell-3.24.2/js/ui/endSessionDialog.js
@@ -426,8 +426,10 @@ const EndSessionDialog = new Lang.Class(
let description;
let displayTime = _roundSecondsToInterval(this._totalSecondsToStayOpen,
- this._secondsLeft,
- 10);
+ this._secondsLeft,
+ // larger than any normal value
+ 1000000);
+
if (this._user.is_loaded) {
let realName = this._user.get_real_name();

BIN
gnome-shell-44.1.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
From 29dfda2d2f77d14e27cc27cbba1e41ec0363cf83 Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xwang@suse.com>
Date: Thu, 9 Apr 2020 11:16:56 +0800
Subject: [PATCH] Disable ibus when out of CJK
---
js/misc/ibusManager.js | 8 ++++++++
1 file changed, 8 insertions(+)
Index: gnome-shell-3.36.1/js/misc/ibusManager.js
===================================================================
--- gnome-shell-3.36.1.orig/js/misc/ibusManager.js
+++ gnome-shell-3.36.1/js/misc/ibusManager.js
@@ -31,6 +31,10 @@ function getIBusManager() {
var IBusManager = class {
constructor() {
+ let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
+ if (!daemon.query_exists(null))
+ return;
+
IBus.init();
// This is the longest we'll keep the keyboard frozen until an input
@@ -59,6 +63,10 @@ var IBusManager = class {
}
_spawn(extraArgs = []) {
+ let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
+ if (!daemon.query_exists(null))
+ return;
+
try {
let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE);

View File

@ -0,0 +1,25 @@
--- gnome-shell-41.orig/js/ui/endSessionDialog.js 2022-08-11 16:16:07.000000000 +0300
+++ gnome-shell-41/js/ui/endSessionDialog.js 2022-10-26 12:49:20.435238071 +0300
@@ -707,19 +703,7 @@
}
async _getUpdateInfo() {
- const connection = this._pkOfflineProxy.get_connection();
- const reply = await connection.call(
- this._pkOfflineProxy.g_name,
- this._pkOfflineProxy.g_object_path,
- 'org.freedesktop.DBus.Properties',
- 'GetAll',
- new GLib.Variant('(s)', [this._pkOfflineProxy.g_interface_name]),
- null,
- Gio.DBusCallFlags.NONE,
- -1,
- null);
- const [info] = reply.recursiveUnpack();
- return info;
+ return [];
}
async OpenAsync(parameters, invocation) {

376
gnome-shell-domain.patch Normal file
View File

@ -0,0 +1,376 @@
diff --git a/js/gdm/domain.js b/js/gdm/domain.js
new file mode 100644
index 0000000..2452696
--- /dev/null
+++ b/js/gdm/domain.js
@@ -0,0 +1,243 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+/*
+ * Copyright 2011 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+const Atk = imports.gi.Atk;
+const Clutter = imports.gi.Clutter;
+const Gdm = imports.gi.Gdm;
+const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
+const Gtk = imports.gi.Gtk;
+const Lang = imports.lang;
+const Mainloop = imports.mainloop;
+const Signals = imports.signals;
+const St = imports.gi.St;
+
+const Main = imports.ui.main;
+const PopupMenu = imports.ui.popupMenu;
+
+const DomainLoadStatus = {
+ INIT : 0,
+ SEPARATOR : 1,
+ OWN_DOMAIN : 2,
+ TRUSTED_DOMAINS : 3,
+ DONE : 4,
+ ERR : 5
+};
+
+var DomainMenuButton = new Lang.Class({
+ Name: 'DomainMenuButton',
+
+ _init: function () {
+ this._separator = null;
+ this.domain_enabled = false;
+ this._domains = new Array();
+ this._load_config();
+ },
+
+
+ _domainsPush: function(domain) {
+ let valid_content = domain.replace(/\s+/g, '');
+
+ if (valid_content.length > 0) {
+ if (this._domains.indexOf(valid_content) == -1)
+ this._domains.push (valid_content);
+ }
+ },
+
+ _generate: function() {
+ let gearIcon = new St.Icon({ icon_name: 'samba-window',
+ icon_size: 24
+ });
+ this._button = new St.Button({ style_class: 'login-dialog-session-list-button', //FIXME
+ reactive: true,
+ track_hover: true,
+ can_focus: true,
+ accessible_name: _("Choose Domain"),
+ accessible_role: Atk.Role.MENU,
+ child: gearIcon });
+
+ gearIcon.show();
+ this.actor = new St.Bin({ child: this._button });
+
+ this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.TOP);
+ Main.uiGroup.add_actor(this._menu.actor);
+ this._menu.actor.hide();
+
+ this._menu.connect('open-state-changed',
+ Lang.bind(this, function(menu, isOpen) {
+ if (isOpen)
+ this._button.add_style_pseudo_class('active');
+ else
+ this._button.remove_style_pseudo_class('active');
+ }));
+
+ this._manager = new PopupMenu.PopupMenuManager({ actor: this._button });
+ this._manager.addMenu(this._menu);
+
+ this._button.connect('clicked', Lang.bind(this, function() {
+ this._menu.toggle();
+ }));
+
+ this._populate();
+ },
+
+ _load_config: function() {
+ let keyfile = new GLib.KeyFile();
+ let path = "/etc/gdm/custom.conf";
+ let domain_group = "domains";
+
+ //? Why must use 'try'
+ try {
+ keyfile.load_from_file(path, GLib.KeyFileFlags.NONE);
+ } catch(e) {
+ }
+
+ if (!keyfile.has_group(domain_group)) {
+ return;
+ }
+
+ this.domain_enabled = keyfile.get_boolean(domain_group, 'Enable');
+ if (this.domain_enabled) {
+ let content = keyfile.get_string(domain_group, 'Domains');
+ let domains = content.split(';');
+ for (let i = 0; i < domains.length; i++) {
+ this._domainsPush(domains[i]);
+ }
+ this._generate();
+ }
+ },
+
+ _readStdout: function(data) {
+ this._dataStdout.read_line_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this, function(stream, result) {
+ let [line, len] = this._dataStdout.read_line_finish_utf8(result);
+
+ if (line == null) {
+ // end of file
+ this._stdout.close(null);
+ this.loadDomains(data, null);
+ return;
+ }
+
+ data.push(line);
+ this._readStdout(data);
+ }));
+ },
+
+ loadCommand: function(argv) {
+ try {
+ let data = new Array();
+ let [success, pid, stdin, stdout, stderr] = GLib.spawn_async_with_pipes(null,
+ argv,
+ null,
+ GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
+ null);
+ this._stdout = new Gio.UnixInputStream({ fd: stdout, close_fd: true });
+ GLib.close(stdin);
+ GLib.close(stderr);
+ this._dataStdout = new Gio.DataInputStream({ base_stream: this._stdout });
+ this._readStdout(data);
+ } catch (e) {
+ this.loadDomains(null, e);
+ }
+ },
+
+ loadDomains: function(data, err) {
+ /*FIXME: reload every 5 minutes? */
+ /*TODO: load the setting file */
+ switch (this._status) {
+ case DomainLoadStatus.INIT:
+ this._status = DomainLoadStatus.SEPARATOR;
+ this.loadCommand(["wbinfo", "--separator"]);
+ break;
+ case DomainLoadStatus.SEPARATOR:
+ if (data) {
+ this._separator = data[0];
+ this._status = DomainLoadStatus.OWN_DOMAIN;
+ this.loadCommand(["wbinfo", "--own-domain"]);
+ } else {
+ this._status = DomainLoadStatus.ERR;
+ this._menu.removeAll();
+ item = new PopupMenu.PopupMenuItem(_("Cannot receive 'separator'"));
+ item.setSensitive(false);
+ this._menu.addMenuItem(item);
+ }
+ break;
+ case DomainLoadStatus.OWN_DOMAIN:
+ if (data) {
+ for (let i = 0; i < data.length; i++) {
+ this._domainsPush(data[i]);
+ }
+ }
+ this._status = DomainLoadStatus.TRUSTED_DOMAINS;
+ this.loadCommand(["wbinfo", "--trusted-domains"]);
+ break;
+ case DomainLoadStatus.TRUSTED_DOMAINS:
+ if (data) {
+ for (let i = 0; i < data.length; i++) {
+ this._domainsPush(data[i]);
+ }
+ }
+ this._status = DomainLoadStatus.DONE;
+ this._menu.removeAll();
+ for (let i = 0; i < this._domains.length; i++) {
+ item = new PopupMenu.PopupMenuItem(this._domains[i]);
+ this._menu.addMenuItem(item);
+ item.connect('activate', Lang.bind(this, function(item) {
+ //?? Why it does not work
+ //this.setActiveDomain(this._domains[i]);
+ this.setActiveDomain(item.label.text);
+ }));
+ }
+ break;
+ }
+ },
+
+ _populate: function() {
+ //TODO Recent domains?
+ item = new PopupMenu.PopupMenuItem(_("loading the wbinfos..."));
+ item.setSensitive(false);
+ this._menu.addMenuItem(item);
+ this._status = DomainLoadStatus.INIT;
+ this.loadDomains(null, null);
+ },
+
+ setActiveDomain: function(domain) {
+ this._activeDomain = domain;
+ //this.emit('domain-activated', this._activeDomain);
+ this.emit('domain-activated');
+ },
+
+ getActiveDomain: function(domain) {
+ return this._activeDomain;
+ },
+
+ getQuestionMessage: function() {
+ return _("User for ") + this._activeDomain;
+ },
+
+ getHintMessage: function() {
+ return _("Contact dliang to get help");
+ },
+
+ getDomainUser: function(user) {
+ return this._activeDomain + this._separator + user;
+ }
+});
+Signals.addSignalMethods(DomainMenuButton.prototype);
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 6f66a27..3f01ca0 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -21,6 +21,7 @@ const { AccountsService, Atk, Clutter, Gdm, Gio,
GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
const AuthPrompt = imports.gdm.authPrompt;
+const Domain = imports.gdm.domain;
const Batch = imports.gdm.batch;
const BoxPointer = imports.ui.boxpointer;
const CtrlAltTab = imports.ui.ctrlAltTab;
@@ -449,6 +450,10 @@ var LoginDialog = GObject.registerClass({
this._authPrompt.hide();
this.add_child(this._authPrompt);
+ this._userLayout = new St.BoxLayout({ vertical: false,
+ x_expand: true });
+ this._userSelectionBox.add_child(this._userLayout);
+
// translators: this message is shown below the user list on the
// login screen. It can be activated to reveal an entry for
// manually entering the username.
@@ -470,7 +475,18 @@ var LoginDialog = GObject.registerClass({
this._notListedButton.hide();
- this._userSelectionBox.add_child(this._notListedButton);
+ this._userLayout.add_child(this._notListedButton);
+
+ // we add domain menu button
+ this._domainMenuButton = new Domain.DomainMenuButton();
+ if (this._domainMenuButton.domain_enabled) {
+ this._domainMenuButton.actor.hide();
+
+ this._domainMenuButton.connect('domain-activated',
+ Lang.bind(this, function(list) {
+ this._hideUserListAskForDomainUsernameAndBeginVerification(); }));
+ this._userLayout.add_child(this._domainMenuButton.actor);
+ } // domain end
this._bannerView = new St.ScrollView({ style_class: 'login-dialog-banner-view',
opacity: 0,
@@ -979,6 +995,37 @@ var LoginDialog = GObject.registerClass({
});
}
+ _askForDomainUsernameAndBeginVerification(domain) {
+ this._authPrompt.setPasswordChar('');
+ this._authPrompt.setQuestion(this._domainMenuButton.getQuestionMessage());
+
+ //FIXME: I sugguest to add this info for customer to contact their account manager
+ this._authPrompt.setMessage(this._domainMenuButton.getHintMessage(), GdmUtil.MessageType.HINT);
+
+ let realmManager = new Realmd.Manager();
+ let realmSignalId = realmManager.connect('login-format-changed',
+ Lang.bind(this, this._showRealmLoginHint));
+ this._showRealmLoginHint(realmManager.loginFormat);
+
+ let nextSignalId = this._authPrompt.connect('next',
+ Lang.bind(this, function() {
+ this._authPrompt.disconnect(nextSignalId);
+ this._authPrompt.updateSensitivity(false);
+ let answer = this._authPrompt.getAnswer();
+ let domain_answer = this._domainMenuButton.getDomainUser(answer);
+ this._user = this._userManager.get_user(domain_answer);
+ this._authPrompt.clear();
+ this._authPrompt.startSpinning();
+ this._authPrompt.begin({ userName: domain_answer});
+ this._updateCancelButton();
+
+ realmManager.disconnect(realmSignalId)
+ realmManager.release();
+ }));
+ this._updateCancelButton();
+ this._showPrompt();
+ }
+
_startSession(serviceName) {
this._bindOpacity();
this.ease({
@@ -1134,6 +1181,11 @@ var LoginDialog = GObject.registerClass({
this._askForUsernameAndBeginVerification();
}
+ _hideUserListAskForDomainUsernameAndBeginVerification() {
+ this._hideUserList();
+ this._askForDomainUsernameAndBeginVerification();
+ }
+
_hideUserListAndBeginVerification() {
this._hideUserList();
this._authPrompt.begin();
@@ -1147,6 +1199,9 @@ var LoginDialog = GObject.registerClass({
this._sessionMenuButton.hide();
this._setUserListExpanded(true);
this._notListedButton.show();
+ if (this._domainMenuButton.domain_enabled)
+ this._domainMenuButton.actor.show();
+ this._userLayout.show();
this._userList.grab_key_focus();
}
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
index eebbc36..5e5e7e2 100644
--- a/js/js-resources.gresource.xml
+++ b/js/js-resources.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/shell">
<file>gdm/authPrompt.js</file>
+ <file>gdm/domain.js</file>
<file>gdm/batch.js</file>
<file>gdm/loginDialog.js</file>
<file>gdm/oVirt.js</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cb279c1..7772367 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,6 +6,7 @@ data/org.gnome.shell.gschema.xml.in
data/org.gnome.Shell.PortalHelper.desktop.in.in
js/dbusServices/extensions/ui/extension-prefs-dialog.ui
js/gdm/authPrompt.js
+js/gdm/domain.js
js/gdm/loginDialog.js
js/gdm/util.js
js/misc/systemActions.js

View File

@ -0,0 +1,61 @@
Index: gnome-shell-44.beta/data/meson.build
===================================================================
--- gnome-shell-44.beta.orig/data/meson.build
+++ gnome-shell-44.beta/data/meson.build
@@ -117,8 +117,14 @@ if have_systemd
install_dir: systemduserunitdir
)
- units = files('org.gnome.Shell.target',
- 'org.gnome.Shell-disable-extensions.service')
+ configure_file(
+ input: 'org.gnome.Shell-disable-extensions.service.in',
+ output: 'org.gnome.Shell-disable-extensions.service',
+ configuration: unitconf,
+ install_dir: systemduserunitdir
+ )
+
+ units = files('org.gnome.Shell.target')
install_data(units, install_dir: systemduserunitdir)
endif
Index: gnome-shell-44.beta/data/org.gnome.Shell-disable-extensions.service
===================================================================
--- gnome-shell-44.beta.orig/data/org.gnome.Shell-disable-extensions.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Disable GNOME Shell extensions after failure
-# Note that this unit must not conflict with anything, and must
-# be able to run in parallel with the gnome-session-shutdown.target.
-DefaultDependencies=no
-
-# We want to disable extensions only if gnome-shell has flagged the extensions
-# to be a likely cause of trouble.
-ConditionPathExists=%t/gnome-shell-disable-extensions
-
-[Service]
-Type=simple
-# Disable extensions
-ExecStart=gsettings set org.gnome.shell disable-user-extensions true
-Restart=no
Index: gnome-shell-44.beta/data/org.gnome.Shell-disable-extensions.service.in
===================================================================
--- /dev/null
+++ gnome-shell-44.beta/data/org.gnome.Shell-disable-extensions.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=Disable GNOME Shell extensions after failure
+# Note that this unit must not conflict with anything, and must
+# be able to run in parallel with the gnome-session-shutdown.target.
+DefaultDependencies=no
+
+# We want to disable extensions only if gnome-shell has flagged the extensions
+# to be a likely cause of trouble.
+ConditionPathExists=%t/gnome-shell-disable-extensions
+
+[Service]
+Type=simple
+# Disable extensions
+ExecStart=@bindir@/gsettings set org.gnome.shell disable-user-extensions true
+Restart=no

View File

@ -0,0 +1,13 @@
Index: gnome-shell-44.beta/src/main.c
===================================================================
--- gnome-shell-44.beta.orig/src/main.c
+++ gnome-shell-44.beta/src/main.c
@@ -680,7 +680,7 @@ main (int argc, char **argv)
g_object_unref (shell_global_get ());
g_debug ("Tearing down the mutter context");
- meta_context_destroy (g_steal_pointer (&context));
+ g_steal_pointer (&context);
return ecode;
}

View File

@ -0,0 +1,146 @@
Index: gnome-shell-40.rc/data/gnome-shell-theme.gresource.xml
===================================================================
--- gnome-shell-40.rc.orig/data/gnome-shell-theme.gresource.xml
+++ gnome-shell-40.rc/data/gnome-shell-theme.gresource.xml
@@ -16,6 +16,7 @@
<file alias="icons/scalable/status/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
<file>no-events.svg</file>
<file>no-notifications.svg</file>
+ <file>noise-texture.png</file>
<file>pad-osd.css</file>
<file alias="icons/scalable/status/eye-open-negative-filled-symbolic.svg">eye-open-negative-filled-symbolic.svg</file>
<file alias="icons/scalable/status/eye-not-looking-symbolic.svg">eye-not-looking-symbolic.svg</file>
Index: gnome-shell-40.rc/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
===================================================================
--- gnome-shell-40.rc.orig/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
+++ gnome-shell-40.rc/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
@@ -65,6 +65,11 @@
box-shadow: 0px 2px 4px rgba(0,0,0,0.6);
}
+.bgLockDialogGroup-background {
+ border: none;
+ background-color: transparent;
+}
+
#lockDialogGroup {
background-color: $system_bg_color;
}
Index: gnome-shell-40.rc/js/ui/screenShield.js
===================================================================
--- gnome-shell-40.rc.orig/js/ui/screenShield.js
+++ gnome-shell-40.rc/js/ui/screenShield.js
@@ -4,6 +4,7 @@ const { AccountsService, Clutter, Gio,
GLib, Graphene, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
+const Background = imports.ui.background;
const GnomeSession = imports.misc.gnomeSession;
const OVirt = imports.gdm.oVirt;
const LoginManager = imports.misc.loginManager;
@@ -16,6 +17,8 @@ const SmartcardManager = imports.misc.sm
const { adjustAnimationTime } = imports.ui.environment;
+const LOCKDIALOG_BACKGROUND_SCHEMA = 'org.gnome.desktop.background.lockdialog';
+
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
const LOCK_ENABLED_KEY = 'lock-enabled';
const LOCK_DELAY_KEY = 'lock-delay';
@@ -25,6 +28,9 @@ const DISABLE_LOCK_KEY = 'disable-lock-s
const LOCKED_STATE_STR = 'screenShield.locked';
+const BLUR_BRIGHTNESS = 0.55;
+const BLUR_SIGMA = 60;
+
// ScreenShield animation time
// - STANDARD_FADE_TIME is used when the session goes idle
// - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
@@ -65,6 +71,16 @@ var ScreenShield = class {
name: 'lockDialogGroup',
});
+ // Add background for this._lockDialogGroup
+ this._bgLockDialogGroup = new Clutter.Actor();
+ this._lockDialogGroup.add_actor(this._bgLockDialogGroup);
+ this._lockDialogGroup.set_child_below_sibling(this._bgLockDialogGroup, null);
+ this._bgManagersLockDialogGroup = [];
+
+ this._updateBgLockDialogGroup();
+ this._monitorsChangedId =
+ Main.layoutManager.connect('monitors-changed', this._updateBgLockDialogGroup.bind(this));
+
this.actor.add_actor(this._lockScreenGroup);
this.actor.add_actor(this._lockDialogGroup);
@@ -142,6 +158,15 @@ var ScreenShield = class {
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
this._syncInhibitor();
+
+ this.connect('destroy', this._onDestroy.bind(this));
+ }
+
+ _onDestroy() {
+ if (this._monitorsChangedId) {
+ Main.layoutManager.disconnect(this._monitorsChangedId);
+ delete this._monitorsChangedId;
+ }
}
_setActive(active) {
@@ -492,6 +517,53 @@ var ScreenShield = class {
this.emit('wake-up-screen');
}
+ _createBgLockDialogGroup(monitorIndex) {
+ let monitor = Main.layoutManager.monitors[monitorIndex];
+ let widget = new St.Widget({
+ style_class: 'bgLockDialogGroup-background',
+ x: monitor.x,
+ y: monitor.y,
+ width: monitor.width,
+ height: monitor.height,
+ });
+
+ let bgManager = new Background.BackgroundManager({
+ container: widget,
+ monitorIndex,
+ controlPosition: false,
+ settingsSchema: LOCKDIALOG_BACKGROUND_SCHEMA
+ });
+
+ this._bgManagersLockDialogGroup.push(bgManager);
+
+ this._bgLockDialogGroup.add_child(widget);
+
+ const themeContext = St.ThemeContext.get_for_stage(global.stage);
+
+ let effect = new Shell.BlurEffect({
+ brightness: BLUR_BRIGHTNESS,
+ sigma: BLUR_SIGMA * themeContext.scale_factor,
+ });
+
+ this._scaleChangedId = themeContext.connect('notify::scale-factor', () => {
+ effect.sigma = BLUR_SIGMA * themeContext.scale_factor;
+ });
+
+ widget.add_effect(effect);
+ }
+
+ _updateBgLockDialogGroup() {
+ for (let i = 0; i < this._bgManagersLockDialogGroup.length; i++)
+ this._bgManagersLockDialogGroup[i].destroy();
+
+ this._bgManagersLockDialogGroup = [];
+ this._bgLockDialogGroup.destroy_all_children();
+
+ for (let i = 0; i < Main.layoutManager.monitors.length; i++)
+ this._createBgLockDialogGroup(i);
+ }
+
+
get locked() {
return this._isLocked;
}

View File

@ -0,0 +1,193 @@
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
index e65e0e9..eebbc36 100644
--- a/js/js-resources.gresource.xml
+++ b/js/js-resources.gresource.xml
@@ -35,6 +35,7 @@
<file>perf/core.js</file>
<file>perf/hwtest.js</file>
+ <file>ui/aboutMenu.js</file>
<file>ui/accessDialog.js</file>
<file>ui/altTab.js</file>
<file>ui/animation.js</file>
diff --git a/js/ui/aboutMenu.js b/js/ui/aboutMenu.js
new file mode 100644
index 0000000..7add645
--- /dev/null
+++ b/js/ui/aboutMenu.js
@@ -0,0 +1,150 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+const GLib = imports.gi.GLib;
+const Gio = imports.gi.Gio;
+const Lang = imports.lang;
+const Clutter = imports.gi.Clutter;
+const St = imports.gi.St;
+const DBus = imports.gi.DBus;
+
+const PanelMenu = imports.ui.panelMenu;
+
+const AboutMenuButton = new Lang.Class({
+ Name: 'AboutMenuButton',
+ Extends: PanelMenu.Button,
+ _init() {
+ this._hostname = null;
+ this._updateHostnameId = 0;
+ this._ticket = 1;
+
+ let hbox;
+ let vbox;
+ let menuAlignment = 0.25;
+
+ if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
+ menuAlignment = 1.0 - menuAlignment;
+ this.parent(menuAlignment, 'About Me');
+
+ this.about_hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
+ this.hostname_label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
+ this.about_hbox.add_child(this.hostname_label);
+
+ this.actor.add_child(this.about_hbox);
+ hbox = new St.BoxLayout({ name: 'aboutArea' });
+ this.menu.box.add_child(hbox);
+
+ vbox = new St.BoxLayout({vertical: true});
+ hbox.add(vbox);
+
+ ///// Section: read '/etc/os-release' to get pretty name
+ //
+ // Note: previously this is defaulted to 'SUSE Linux Enterprise', now
+ // let's use a "safer" option.
+ let sysinfo_text = 'SUSE Linux';
+ try {
+ let success, contents, tag;
+ let _os_release = Gio.File.new_for_path('/etc/os-release');
+ [success, contents, tag] = _os_release.load_contents(null);
+
+ let osReleaseContentStr = contents.toString();
+ let prettyNameReg = /^PRETTY_NAME="(.+)"/;
+ let match = null;
+ for (let line of osReleaseContentStr.split('\n')) {
+ match = prettyNameReg.exec(line);
+ if (match) {
+ sysinfo_text = match[1];
+ }
+ }
+ }
+ catch (e) {
+ // NOTE soft fail, 'sysinfo_text' is the default
+ warn('ERROR: fail to read /etc/os-release');
+ }
+
+ this._sysinfo = new St.Label({ text: sysinfo_text, can_focus: true });
+ vbox.add(this._sysinfo);
+ this.actor.hide();
+
+ this._updateHostnameId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
+ this._ticket,
+ Lang.bind(this, function() {
+ if (this._ticket < 60*60)
+ this._ticket *= 2;
+ this._updateHostnameId = 0;
+ this._updateHostname();
+ return false;
+ }));
+
+ return;
+ },
+
+ _updateHostname(){
+ let hostname_text = get_hostname();
+
+ if ((this._hostname == null) || (this._hostname != hostname_text)) {
+ this._ticket = 1;
+ this._hostname = hostname_text;
+ this.hostname_label.set_text(this._hostname);
+ this.actor.show();
+ }
+ this._updateHostnameId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT,
+ this._ticket,
+ Lang.bind(this, function() {
+ if (this._ticket < 60*60)
+ this._ticket *= 2;
+ this._updateHostnameId = 0;
+ this._updateHostname();
+ return false;
+ }));
+ },
+
+ _destroy() {
+ this._ticket = 1;
+ if (this._updateHostnameId) {
+ GLib.source_remove (this._updateHostnameId);
+ this._updateHostnameId = 0;
+ }
+ },
+
+});
+
+function get_hostname() {
+ let hostname;
+ let interface_name = [GLib.Variant.new_string('org.freedesktop.hostname1'),
+ GLib.Variant.new_string('Hostname')];
+
+ let call = {
+ bus_name: 'org.freedesktop.hostname1',
+ object_path: '/org/freedesktop/hostname1',
+ interface_name: 'org.freedesktop.DBus.Properties',
+ method_name: 'Get',
+ parameters: GLib.Variant.new_tuple(interface_name, 2),
+ reply_type: null,
+ flags: Gio.DBusCallFlags.NONE,
+ timeout_msec: -1,
+ cancellable: null,
+ };
+
+ try {
+ let dbusConnection = Gio.bus_get_sync(DBus.BusType.SYSTEM, null);
+
+ let message = dbusConnection.call_sync(
+ call.bus_name,
+ call.object_path,
+ call.interface_name,
+ call.method_name,
+ call.parameters,
+ call.reply_type,
+ call.flags,
+ call.timeout_msec,
+ call.cancellable
+ );
+
+ hostname = message.get_child_value(0).get_variant().get_string()[0];
+
+ } catch(e) {
+ hostname = 'localhost';
+ }
+
+ return hostname;
+}
diff --git a/js/ui/panel.js b/js/ui/panel.js
index cba3241..f5dfc2b 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -722,6 +722,7 @@ class AggregateMenu extends PanelMenu.Button {
});
const PANEL_ITEM_IMPLEMENTATIONS = {
+ 'aboutMenu': imports.ui.aboutMenu.AboutMenuButton,
'activities': ActivitiesButton,
'aggregateMenu': AggregateMenu,
'appMenu': AppMenuButton,
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index 2136e94..6d5e7c8 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -34,7 +34,7 @@ const _modes = {
unlockDialog: null,
components: [],
panel: {
- left: [],
+ left: ['aboutMenu'],
center: [],
right: [],
},

View File

@ -0,0 +1,43 @@
diff -Nura gnome-shell-40.0/js/ui/status/keyboard.js gnome-shell-40.0_new/js/ui/status/keyboard.js
--- gnome-shell-40.0/js/ui/status/keyboard.js 2021-03-20 20:17:01.436522500 +0800
+++ gnome-shell-40.0_new/js/ui/status/keyboard.js 2021-03-30 20:02:18.835931202 +0800
@@ -264,6 +264,39 @@
this._settings.connect('changed::%s'.format(this._KEY_INPUT_SOURCES), this._emitInputSourcesChanged.bind(this));
this._settings.connect('changed::%s'.format(this._KEY_KEYBOARD_OPTIONS), this._emitKeyboardOptionsChanged.bind(this));
this._settings.connect('changed::%s'.format(this._KEY_PER_WINDOW), this._emitPerWindowChanged.bind(this));
+
+ let sources = this._settings.get_value(this._KEY_INPUT_SOURCES);
+ let nSources = sources.n_children();
+ let sourcesList = [];
+
+ if (nSources <= 1) {
+ if (GLib.getenv('LANG') == 'zh_CN.UTF-8') {
+ log('Set default input method in Chinese language env.');
+ sourcesList.push(['xkb', 'cn']);
+ sourcesList.push([ "ibus", "libpinyin" ]);
+
+ let params = GLib.Variant.new('a(ss)', sourcesList);
+ this._settings.set_value(this._KEY_INPUT_SOURCES, params);
+ }
+
+ else if (GLib.getenv('LANG') == 'ja_JP.UTF-8') {
+ log('Set default input method in Japanese language env.');
+ sourcesList.push([ "ibus", "mozc-jp" ]);
+ sourcesList.push(['xkb', 'jp']);
+
+ let params = GLib.Variant.new('a(ss)', sourcesList);
+ this._settings.set_value(this._KEY_INPUT_SOURCES, params);
+ }
+
+ else if (GLib.getenv('LANG') == 'ko_KR.UTF-8') {
+ log('Set default input method in Korean language env.');
+ sourcesList.push(['xkb', 'kr']);
+ sourcesList.push([ "ibus", "hangul" ]);
+
+ let params = GLib.Variant.new('a(ss)', sourcesList);
+ this._settings.set_value(this._KEY_INPUT_SOURCES, params);
+ }
+ }
}
_getSourcesList(key) {

View File

@ -0,0 +1,24 @@
Index: gnome-shell-44.beta/js/ui/endSessionDialog.js
===================================================================
--- gnome-shell-44.beta.orig/js/ui/endSessionDialog.js
+++ gnome-shell-44.beta/js/ui/endSessionDialog.js
@@ -296,7 +296,7 @@ class EndSessionDialog extends ModalDial
this.contentLayout.add_child(this._applicationSection);
this._sessionSection = new Dialog.ListSection({
- title: _('Other users are logged in'),
+ title: _('Other users are logged in. You can list these users with the "who" command.'),
});
this.contentLayout.add_child(this._sessionSection);
@@ -758,8 +758,8 @@ class EndSessionDialog extends ModalDial
this._applications.push(inhibitor);
}
- if (dialogContent.showOtherSessions)
- this._loadSessions();
+ // if (dialogContent.showOtherSessions) // Hide _sessionList for jsc#SLE-9267
+ // this._loadSessions();
let updatesAllowed = this._updatesPermission && this._updatesPermission.allowed;

View File

@ -0,0 +1,39 @@
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index e3b9a5d..3296e1d 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -940,6 +940,11 @@ const WirelessNetwork = GObject.registerClass({
this._getDeviceDBusPath(), ap.get_path());
} else {
conn = new NM.SimpleConnection();
+ if (this._IsPrivateConnections()) {
+ let connectionSetting = new NM.SettingConnection();
+ connectionSetting.add_permission('user', GLib.get_user_name(), null);
+ conn.add_setting(connectionSetting);
+ }
this._device.client.add_and_activate_connection_async(
conn, this._device, ap.get_path(), null, null);
}
@@ -949,6 +954,22 @@ const WirelessNetwork = GObject.registerClass({
this.emit('destroy');
}
+ _IsPrivateConnections() {
+ let privateConnections = true;
+ let authority = Polkit.Authority.get_sync(null);
+ let credential = new Gio.Credentials();
+ let subject = new Polkit.UnixProcess({ pid: credential.get_unix_pid(), uid: credential.get_unix_user() });
+ let authResult = authority.check_authorization_sync(subject,
+ 'org.freedesktop.NetworkManager.settings.modify.system',
+ null /* details */,
+ Polkit.CheckAuthorizationFlags.NONE,
+ null /* cancellable */);
+ if (authResult)
+ privateConnections = !authResult.get_is_authorized();
+
+ return privateConnections;
+ }
+
_getDeviceDBusPath() {
// nm_object_get_path() is shadowed by nm_device_get_path()
return NM.Object.prototype.get_path.call(this._device);

View File

@ -0,0 +1,16 @@
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index d2c9a16..7a4a0d3 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -500,8 +500,10 @@ var AuthPrompt = GObject.registerClass({
this._updateEntry(true);
this.stopSpinning();
- if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
+ if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED) {
+ this._userVerifier.cancel();
this.emit('failed');
+ }
else if (oldStatus === AuthPromptStatus.VERIFICATION_CANCELLED)
this.emit('cancelled');

8436
gnome-shell.changes Normal file

File diff suppressed because it is too large Load Diff

4
gnome-shell.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: gnome-shell
version: 44.1
mtime: 1682324816
commit: b0ca64e7775225b7c5d049571a44ef40bf516406

345
gnome-shell.spec Normal file
View File

@ -0,0 +1,345 @@
#
# spec file for package gnome-shell
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global __requires_exclude typelib\\(Meta|MetaTest|Soup|St|Cogl|Clutter\\)
%define mutter_api 12
%define mutter_req 44.beta
Name: gnome-shell
Version: 44.1
Release: 0
Summary: GNOME Shell
# shew extension is LGPL 2.1; gnome-shell-extension-tool is GPL-3.0-or-later
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-3.0-or-later
Group: System/GUI/GNOME
URL: https://wiki.gnome.org/Projects/GnomeShell
# Source url disabled as we are using a git checkout via source service
#Source0: https://download.gnome.org/sources/gnome-shell/41/%%{name}-%%{version}.tar.xz
Source0: %{name}-%{version}.tar.xz
# SOURCE-FEATURE-SLE aboutMenu fate#314545 dliang@suse.com -- Add an applet on login UI to display suse icon, product name, hostname.
Source1: aboutMenu.js
# SOURCE-FEATURE-OPENSUSE noise-texture boo#1176418 qkzhu@suse.com -- Add noise-texture as the default greeter background, used by patch4.
Source2: noise-texture.png
# PATCH-FIX-UPSTREAM gnome-shell-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- create private connections if the user is not authorized
Patch1: gnome-shell-private-connection.patch
# PATCH-FIX-OPENSUSE gnome-shell-executable-path-not-absolute.patch bsc#1176051 xwang@suse.com -- Fix ExecStart is not absolute path
Patch7: gnome-shell-executable-path-not-absolute.patch
# PATCH-NEEDS-REBASE gnome-shell-exit-crash-workaround.patch bsc#1190878 glgo#GNOME/gnome-shell#4344 qkzhu@suse.com -- Workaround logout crashing WAS: PATCH-FIX-UPSTREAM
Patch8: gnome-shell-exit-crash-workaround.patch
# PATCH-FIX-UPSTREAM 0001-screenshot-Do-not-wrongly-enable-window-button.patch bsc#1215485 CVE-2023-43090 xwang@suse.com -- Do not wrongly enable window button
Patch9: 0001-screenshot-Do-not-wrongly-enable-window-button.patch
# PATCH-FIX-UPSTREAM 0002-screenshot-Only-handle-mode-switch-shortcut-when-sup.patch bsc#1215485 CVE-2023-43090 xwang@suse.com -- Only handle mode-switch shortcut when supported
Patch10: 0002-screenshot-Only-handle-mode-switch-shortcut-when-sup.patch
## NOTE: Keep SLE-only patches at bottom (starting on 1000).
# PATCH-FEATURE-SLE gnome-shell-gdm-login-applet.patch fate#314545 dliang@suse.com -- Add an applet on login UI to display suse icon, product name, hostname.
Patch1001: gnome-shell-gdm-login-applet.patch
# PATCH-FEATURE-SLE gnome-shell-domain.patch fate#307773 dliang@suse.com -- Active Directory Integration
Patch1002: gnome-shell-domain.patch
# PATCH-FIX-SLE gnome-shell-screen-disappear.patch bnc#870217 dliang@suse.com -- screen disapper.
Patch1003: gnome-shell-screen-disappear.patch
# PATCH-FIX-SLE endSession-dialog-update-time-label-every-sec.patch bnc#886132 cxiong@suse.com -- update time label every second in end session dialog
Patch1004: endSession-dialog-update-time-label-every-sec.patch
# PATCH-FIX-SLE gs-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
Patch1007: gs-fate318433-prevent-same-account-multi-logins.patch
# PATCH-FIX-SLE gnome-shell-disable-ibus-when-not-installed.patch bsc#987360 qzhao@suse.com -- disable ibus start when outof Chinese, Japanese, Korean area
Patch1008: gnome-shell-disable-ibus-when-not-installed.patch
# PATCH-FEATURE-SLE gnome-shell-fate324570-Make-GDM-background-image-configurable.patch fate#324570, glgo#GNOME/gnome-shell#680, boo#1172826 qkzhu@suse.com -- make GDM background image configurable
Patch1009: gnome-shell-fate324570-Make-GDM-background-image-configurable.patch
# PATCH-FIX-UPSTREAM gnome-shell-jsc#SLE-16051-Input-method-recommendation.patch jsc#SLE-16051 glgo#GNOME/gnome-shell!1563 qzhao@suse.com -- launch recommended input engines when Gnome-shell init in CJK regions.
Patch1010: gnome-shell-jsc#SLE-16051-Input-method-recommendation.patch
# PATCH-FIX-SLE gnome-shell-disable-offline-update-dialog.patch bsc#944832 milachew@mail.lv -- Disable offline update suggestion before shutdown/reboot in SLE and openSUSE Leap.
Patch1011: gnome-shell-disable-offline-update-dialog.patch
# PATCH-FEATURE-SLE gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch jsc#SLE-9267 qkzhu@suse.com -- Remove sessionList of endSessionDialog
Patch1012: gnome-shell-jscSLE9267-Remove-sessionList-of-endSessionDialog.patch
# needed for directory ownership
BuildRequires: asciidoc
BuildRequires: dbus-1
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gtk-doc
BuildRequires: meson >= 0.58.0
BuildRequires: pkgconfig
BuildRequires: sassc
BuildRequires: xsltproc
BuildRequires: pkgconfig(atk-bridge-2.0)
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(gcr-4) >= 3.90.0
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gdk-x11-3.0)
BuildRequires: pkgconfig(gio-2.0) >= 2.56.0
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.56.0
BuildRequires: pkgconfig(gjs-1.0) >= 1.71.1
BuildRequires: pkgconfig(gnome-autoar-0)
BuildRequires: pkgconfig(gnome-bluetooth-3.0)
BuildRequires: pkgconfig(gnome-desktop-4)
BuildRequires: pkgconfig(gnome-keybindings)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.49.1
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 41.alpha
BuildRequires: pkgconfig(gstreamer-1.0) >= 0.11.92
BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.15.0
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.19
BuildRequires: pkgconfig(json-glib-1.0) >= 0.13.2
BuildRequires: pkgconfig(libcanberra)
BuildRequires: pkgconfig(libcanberra-gtk3)
BuildRequires: pkgconfig(libecal-2.0) >= 3.33.1
BuildRequires: pkgconfig(libedataserver-1.2) >= 3.33.1
BuildRequires: pkgconfig(libgnome-menu-3.0) >= 3.5.3
BuildRequires: pkgconfig(libmutter-%{mutter_api}) >= %{mutter_req}
BuildRequires: pkgconfig(libnm) >= 1.10.4
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(libpulse) >= 2.0
BuildRequires: pkgconfig(libpulse-mainloop-glib)
BuildRequires: pkgconfig(libsecret-1) >= 0.18
BuildRequires: pkgconfig(libsoup-3.0)
BuildRequires: pkgconfig(libstartup-notification-1.0) >= 0.11
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(mutter-clutter-%{mutter_api}) >= %{mutter_req}
BuildRequires: pkgconfig(mutter-cogl-%{mutter_api}) >= %{mutter_req}
BuildRequires: pkgconfig(mutter-cogl-pango-%{mutter_api}) >= %{mutter_req}
BuildRequires: pkgconfig(polkit-agent-1) >= 0.100
BuildRequires: pkgconfig(x11)
BuildRequires: python(abi) >= 3
Requires: gdk-pixbuf-loader-rsvg
Requires: gstreamer-plugin-pipewire
# "System settings" menu item
Requires: gnome-control-center
Requires: gnome-session
# For a GSettings schema and power system icon
Requires: gnome-settings-daemon
# "High Contrast" in accessibility status icon
Requires: gnome-themes-accessibility
Requires: gsettings-desktop-schemas
Requires: mutter >= %{mutter_req}
Requires: typelib(Soup) = 3.0
Recommends: %{name}-calendar
## Finally, dependencies for session services that are needed for system icons and the user menu
# bluetooth system icon
# (lowered to recommends due to bsc#1067603, some setups without bluetooth might want to avoid this dependency)
Recommends: gnome-bluetooth
# The dateTime applet in the panel launches gnome-clocks upon user request
Recommends: gnome-clocks
# gnome-shell implements the dbus interface org.freedesktop.Notifications directly
Provides: dbus(org.freedesktop.Notifications)
# gnome-shell-browser-plugin dropped in 3.31.4
Obsoletes: gnome-shell-browser-plugin <= %{version}
%description
The GNOME Shell redefines user interactions with the GNOME desktop. In
particular, it offers new paradigms for launching applications, accessing
documents, and organizing open windows in GNOME.
%package devel
Summary: Development files for GNOME Shell
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
%description devel
The GNOME Shell redefines user interactions with the GNOME desktop. In
particular, it offers new paradigms for launching applications, accessing
documents, and organizing open windows in GNOME.
%package calendar
Summary: Evolution Calendar support for GNOME Shell
Group: System/GUI/GNOME
Requires: %{name} = %{version}
# The clock / calendar applet in the panel requires e-d-s (bnc#795793).
Requires: evolution-data-server
Supplements: (%{name} and evolution-data-server)
%description calendar
This package adds support for Evolution Calendar, such as appointments
into GNOME Shell calendar.
%package -n gnome-extensions
Summary: Extensions app for GNOME Shell
Group: System/GUI/GNOME
Requires: %{name} = %{version}
%description -n gnome-extensions
This package contains an optional extensions app for managing GNOME Shell extensions.
%lang_package
%prep
%setup -q
%patch1 -p1
%patch7 -p1
#patch8 -p1
%patch9 -p1
%patch10 -p1
%if 0%{?sle_version}
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1007 -p1
%patch1008 -p1
%patch1009 -p1
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
%patch1010 -p1
%patch1011 -p1
%endif
%patch1012 -p1
%endif
cp %{SOURCE2} data/theme/
%if 0%{?sle_version}
cp %{SOURCE1} js/ui/
%endif
%build
%meson \
--libexecdir=%{_libexecdir}/%{name} \
-D gtk_doc=true \
-D man=true \
-D networkmanager=true \
-D systemd=true \
-D tests=false \
%{nil}
%meson_build
%install
%meson_install
# This is the directory where extensions get installed
install -d %{buildroot}%{_datadir}/gnome-shell/extensions
# This is the directory where search providers get installed
install -d %{buildroot}%{_datadir}/gnome-shell/search-providers
%find_lang %{name} %{?no_lang_C}
# Work around race, as reported in bnc#844891 & bgo#709313.
install -d %{buildroot}%{_datadir}/gnome-shell/modes
%fdupes %{buildroot}%{_prefix}
# Not needed, only used for nightly git snapshots
rm -f %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Extensions.Devel.svg
%files
%license COPYING
%doc README.md NEWS
%{_bindir}/gnome-shell
%dir %{_libdir}/gnome-shell
%dir %{_libexecdir}/gnome-shell
%exclude %{_libexecdir}/gnome-shell/gnome-shell-calendar-server
%{_libexecdir}/gnome-shell/gnome-shell-hotplug-sniffer
%{_libexecdir}/gnome-shell/gnome-shell-perf-helper
%{_libexecdir}/gnome-shell/gnome-shell-portal-helper
%{_libdir}/gnome-shell/Gvc-1.0.typelib
%{_libdir}/gnome-shell/Shell-12.typelib
%{_libdir}/gnome-shell/St-12.typelib
%{_libdir}/gnome-shell/libgnome-shell-menu.so
%{_libdir}/gnome-shell/libshell-12.so
%{_libdir}/gnome-shell/libgvc.so
%{_libdir}/gnome-shell/libst-12.so
%{_datadir}/applications/org.gnome.Shell.desktop
%{_datadir}/applications/org.gnome.Shell.PortalHelper.desktop
%{_datadir}/dbus-1/interfaces/org.gnome.Shell.Introspect.xml
%{_datadir}/dbus-1/interfaces/org.gnome.Shell.PadOsd.xml
%{_datadir}/dbus-1/interfaces/org.gnome.Shell.Screencast.xml
%{_datadir}/dbus-1/interfaces/org.gnome.Shell.Screenshot.xml
%{_datadir}/dbus-1/interfaces/org.gnome.ShellSearchProvider.xml
%{_datadir}/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml
%{_datadir}/dbus-1/services/org.gnome.Shell.HotplugSniffer.service
%{_datadir}/dbus-1/services/org.gnome.Shell.PortalHelper.service
%{_datadir}/glib-2.0/schemas/org.gnome.shell.gschema.xml
%{_datadir}/gnome-control-center/keybindings/50-gnome-shell-launchers.xml
%{_datadir}/gnome-control-center/keybindings/50-gnome-shell-system.xml
%{_datadir}/gnome-control-center/keybindings/50-gnome-shell-screenshots.xml
# Own these dirs for extensions, search-providers and work around a race condition
%dir %{_datadir}/gnome-shell/extensions
%dir %{_datadir}/gnome-shell/search-providers
%dir %{_datadir}/gnome-shell/modes
%{_datadir}/gnome-shell/gnome-shell-dbus-interfaces.gresource
%{_datadir}/gnome-shell/gnome-shell-theme.gresource
%{_datadir}/gnome-shell/gnome-shell-osk-layouts.gresource
%{_datadir}/gnome-shell/perf-background.xml
%{_datadir}/gnome-shell/gnome-shell-icons.gresource
%{_mandir}/man?/gnome-shell.?%{ext_man}
%dir %{_datadir}/xdg-desktop-portal
%dir %{_datadir}/xdg-desktop-portal/portals
%{_datadir}/xdg-desktop-portal/portals/gnome-shell.portal
%{_userunitdir}/org.gnome.Shell.target
%{_userunitdir}/org.gnome.Shell@wayland.service
%{_userunitdir}/org.gnome.Shell@x11.service
%{_datadir}/glib-2.0/schemas/00_org.gnome.shell.gschema.override
%dir %{_libdir}/gnome-shell/girepository-1.0
%{_libdir}/gnome-shell/girepository-1.0/Shew-0.typelib
%{_libdir}/gnome-shell/libshew-0.so
%{_datadir}/dbus-1/services/org.gnome.Shell.Notifications.service
%{_datadir}/gnome-shell/org.gnome.Shell.Notifications
%{_datadir}/gnome-shell/org.gnome.Shell.Notifications.src.gresource
%{_datadir}/dbus-1/services/org.gnome.Shell.Screencast.service
%{_datadir}/gnome-shell/org.gnome.Shell.Screencast
%{_datadir}/gnome-shell/org.gnome.Shell.Screencast.src.gresource
%{_datadir}/dbus-1/services/org.gnome.ScreenSaver.service
%{_datadir}/gnome-shell/org.gnome.ScreenSaver
%{_datadir}/gnome-shell/org.gnome.ScreenSaver.src.gresource
%{_bindir}/gnome-shell-extension-tool
%{_bindir}/gnome-shell-perf-tool
%{_bindir}/gnome-extensions
%{_bindir}/gnome-shell-extension-prefs
%{_mandir}/man?/gnome-extensions.?%{ext_man}
%{_datadir}/bash-completion/completions/gnome-extensions
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Shell.Extensions.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Shell.Extensions-symbolic.svg
%{_userunitdir}/org.gnome.Shell-disable-extensions.service
%{_datadir}/applications/org.gnome.Shell.Extensions.desktop
%{_datadir}/dbus-1/interfaces/org.gnome.Shell.Extensions.xml
%{_datadir}/dbus-1/services/org.gnome.Shell.Extensions.service
%{_datadir}/gnome-shell/org.gnome.Shell.Extensions
%{_datadir}/gnome-shell/org.gnome.Shell.Extensions.src.gresource
%files devel
%doc HACKING.md
%doc %{_datadir}/gtk-doc/html
%{_datadir}/gnome-shell/*.gir
%dir %{_datadir}/gnome-shell/gir-1.0
%{_datadir}/gnome-shell/gir-1.0/Shew-0.gir
%files calendar
%{_libexecdir}/gnome-shell/gnome-shell-calendar-server
%{_datadir}/dbus-1/services/org.gnome.Shell.CalendarServer.service
%files -n gnome-extensions
%{_bindir}/gnome-extensions-app
%{_datadir}/applications/org.gnome.Extensions.desktop
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Extensions.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Extensions-symbolic.svg
%{_datadir}/dbus-1/services/org.gnome.Extensions.service
%{_datadir}/gnome-shell/org.gnome.Extensions
%{_datadir}/gnome-shell/org.gnome.Extensions.data.gresource
%{_datadir}/gnome-shell/org.gnome.Extensions.src.gresource
%{_datadir}/metainfo/org.gnome.Extensions.metainfo.xml
%files lang -f %{name}.lang
%changelog

View File

@ -0,0 +1,34 @@
Index: gnome-shell-41.3/js/gdm/loginDialog.js
===================================================================
--- gnome-shell-41.3.orig/js/gdm/loginDialog.js
+++ gnome-shell-41.3/js/gdm/loginDialog.js
@@ -1043,6 +1043,29 @@ var LoginDialog = GObject.registerClass(
}
_onSessionOpened(client, serviceName) {
+ if (this._user.get_num_sessions_anywhere() > 1) {
+ this._authPrompt.setMessage(null,
+ _('Sorry, you have to log out a previous session first. Multiple logins are not supported.'),
+ GdmUtil.MessageType.ERROR);
+ // TODO: The following logic relies on the unverified fact that
+ // `AuthPrompt::_onVerificationComplete` seems to always run after
+ // current handler. This might root from the interaction between
+ // greeter and verifier, both are external programs.
+ this._authPrompt.verificationStatus = AuthPrompt.AuthPromptStatus.VERIFIED_BUT_FORBIDDEN;
+ this._authPrompt.cancelButton.reactive = true;
+
+ // NOTE: Failed Attempts as references
+ //
+ // NOTE: reset is too heavy, it skips the error prompt all together
+ // this._authPrompt.reset();
+ //
+ // NOTE: Diconnect at this stage is not working
+ //
+ // this._authPrompt._userVerifier.disconnect(this._authPrompt._userVerifierCompleteId);
+
+ return;
+ }
+
this._authPrompt.finish(() => this._startSession(serviceName));
}

BIN
noise-texture.png (Stored with Git LFS) Normal file

Binary file not shown.