import gnome-shell-3.32.2-36.el8

This commit is contained in:
CentOS Sources 2021-07-23 10:36:41 +00:00 committed by Andrew Lukoshko
parent 3bf578c0b7
commit 8eb994b323
5 changed files with 431 additions and 3 deletions

View File

@ -0,0 +1,91 @@
From e6cd96a9f6a89f77ca0fab72aff8c56354b59f38 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Aug 2019 15:01:34 -0400
Subject: [PATCH 1/4] shellEntry: Determine if password entry from content
purpose not menu item
Right now shellEntry decides whether or not it's a password entry based
on whether or not it has a "Show Text" context menu.
That's a little roundabout, and gets in the way off providing lockdown
that disables the menu.
This commit changes shellEntry to base whether or not it's a password
entry from it's input content purpose instead of from the presence
or absence of a context menu.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/687
---
js/ui/shellEntry.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 53bd1daa1..cac4ec9c2 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -14,61 +14,61 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
this._entry = entry;
this._clipboard = St.Clipboard.get_default();
// Populate menu
let item;
item = new PopupMenu.PopupMenuItem(_("Copy"));
item.connect('activate', this._onCopyActivated.bind(this));
this.addMenuItem(item);
this._copyItem = item;
item = new PopupMenu.PopupMenuItem(_("Paste"));
item.connect('activate', this._onPasteActivated.bind(this));
this.addMenuItem(item);
this._pasteItem = item;
this._passwordItem = null;
Main.uiGroup.add_actor(this.actor);
this.actor.hide();
}
_makePasswordItem() {
let item = new PopupMenu.PopupMenuItem('');
item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item);
this._passwordItem = item;
}
get isPassword() {
- return this._passwordItem != null;
+ return this._entry.input_purpose == Clutter.InputContentPurpose.PASSWORD;
}
set isPassword(v) {
if (v == this.isPassword)
return;
if (v) {
this._makePasswordItem();
this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD;
} else {
this._passwordItem.destroy();
this._passwordItem = null;
this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL;
}
}
open(animate) {
this._updatePasteItem();
this._updateCopyItem();
if (this._passwordItem)
this._updatePasswordItem();
super.open(animate);
this._entry.add_style_pseudo_class('focus');
let direction = St.DirectionType.TAB_FORWARD;
if (!this.actor.navigate_focus(null, direction, false))
this.actor.grab_key_focus();
}
--
2.27.0

View File

@ -0,0 +1,92 @@
From de7df6c7248c39d7cce1c70485df72a398da92a3 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Aug 2019 15:48:33 -0400
Subject: [PATCH 2/4] shellEntry: Give password menu item text when it's
created
At the moment, the "Show Text" menu item is only given its text
at the time the menu is opened. This is because the text might
be "Hide Text" or "Show Text" depending on state, so the text
is set up lazily.
That behavior means the menu item can't get added after the
menu is already shown, which is something we'ree going to need
in the future to support lockdown of the "Show Text" item.
This commit ensures the menu item is given text when it's first
created, in addition to when the menu is opened.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/687
---
js/ui/shellEntry.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index cac4ec9c2..603a9c64a 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -11,60 +11,61 @@ const Tweener = imports.ui.tweener;
var EntryMenu = class extends PopupMenu.PopupMenu {
constructor(entry) {
super(entry, 0, St.Side.TOP);
this._entry = entry;
this._clipboard = St.Clipboard.get_default();
// Populate menu
let item;
item = new PopupMenu.PopupMenuItem(_("Copy"));
item.connect('activate', this._onCopyActivated.bind(this));
this.addMenuItem(item);
this._copyItem = item;
item = new PopupMenu.PopupMenuItem(_("Paste"));
item.connect('activate', this._onPasteActivated.bind(this));
this.addMenuItem(item);
this._pasteItem = item;
this._passwordItem = null;
Main.uiGroup.add_actor(this.actor);
this.actor.hide();
}
_makePasswordItem() {
let item = new PopupMenu.PopupMenuItem('');
item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item);
this._passwordItem = item;
+ this._updatePasswordItem();
}
get isPassword() {
return this._entry.input_purpose == Clutter.InputContentPurpose.PASSWORD;
}
set isPassword(v) {
if (v == this.isPassword)
return;
if (v) {
this._makePasswordItem();
this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD;
} else {
this._passwordItem.destroy();
this._passwordItem = null;
this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL;
}
}
open(animate) {
this._updatePasteItem();
this._updateCopyItem();
if (this._passwordItem)
this._updatePasswordItem();
super.open(animate);
this._entry.add_style_pseudo_class('focus');
let direction = St.DirectionType.TAB_FORWARD;
--
2.27.0

View File

@ -0,0 +1,119 @@
From 39cf97176e2a92506081ee151ea546e2c6cf213a Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Aug 2019 15:06:46 -0400
Subject: [PATCH 3/4] shellEntry: Handle password item from dedication function
At the moment, shellEntry handles creating and destroying its
"Show Text" password menu item directly from its isPassword
setter function.
This commit moves that handling to a dedicated _resetPasswordItem
function, as prep work for adding lockdown support of the "Show Text"
menu item.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/687
---
js/ui/shellEntry.js | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 603a9c64a..765cede06 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -14,76 +14,87 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
this._entry = entry;
this._clipboard = St.Clipboard.get_default();
// Populate menu
let item;
item = new PopupMenu.PopupMenuItem(_("Copy"));
item.connect('activate', this._onCopyActivated.bind(this));
this.addMenuItem(item);
this._copyItem = item;
item = new PopupMenu.PopupMenuItem(_("Paste"));
item.connect('activate', this._onPasteActivated.bind(this));
this.addMenuItem(item);
this._pasteItem = item;
this._passwordItem = null;
Main.uiGroup.add_actor(this.actor);
this.actor.hide();
}
_makePasswordItem() {
let item = new PopupMenu.PopupMenuItem('');
item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item);
this._passwordItem = item;
this._updatePasswordItem();
}
+ _resetPasswordItem() {
+ if (!this.isPassword) {
+ if (this._passwordItem) {
+ this._passwordItem.destroy();
+ this._passwordItem = null;
+ }
+ this._entry.clutter_text.set_password_char('\u25cf');
+ } else {
+ if (!this._passwordItem)
+ this._makePasswordItem();
+ }
+ }
+
get isPassword() {
return this._entry.input_purpose == Clutter.InputContentPurpose.PASSWORD;
}
set isPassword(v) {
if (v == this.isPassword)
return;
- if (v) {
- this._makePasswordItem();
+ if (v)
this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD;
- } else {
- this._passwordItem.destroy();
- this._passwordItem = null;
+ else
this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL;
- }
+
+ this._resetPasswordItem();
}
open(animate) {
this._updatePasteItem();
this._updateCopyItem();
if (this._passwordItem)
this._updatePasswordItem();
super.open(animate);
this._entry.add_style_pseudo_class('focus');
let direction = St.DirectionType.TAB_FORWARD;
if (!this.actor.navigate_focus(null, direction, false))
this.actor.grab_key_focus();
}
_updateCopyItem() {
let selection = this._entry.clutter_text.get_selection();
this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
selection && selection != '');
}
_updatePasteItem() {
this._clipboard.get_text(St.ClipboardType.CLIPBOARD,
(clipboard, text) => {
this._pasteItem.setSensitive(text && text != '');
});
}
_updatePasswordItem() {
--
2.27.0

View File

@ -0,0 +1,116 @@
From ee64cd773bdeef845d02dc84063f926d77090dec Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Aug 2019 15:06:46 -0400
Subject: [PATCH 4/4] shellEntry: Support lockdown of "Show Text" menu in
password entries
Some deployments require being able to prevent users from showing
the password they're currently typing.
This commit adds support for that kind of lockdown.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/687
---
js/ui/shellEntry.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 765cede06..c45e4545a 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -1,81 +1,89 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-const { Clutter, GObject, Pango, Shell, St } = imports.gi;
+const { Clutter, Gio, GObject, Pango, Shell, St } = imports.gi;
const BoxPointer = imports.ui.boxpointer;
const Main = imports.ui.main;
const Params = imports.misc.params;
const PopupMenu = imports.ui.popupMenu;
const Tweener = imports.ui.tweener;
+const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
+const DISABLE_SHOW_PASSWORD_KEY = 'disable-show-password';
+
var EntryMenu = class extends PopupMenu.PopupMenu {
constructor(entry) {
super(entry, 0, St.Side.TOP);
+ this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
+ this._lockdownSettings.connect('changed::' + DISABLE_SHOW_PASSWORD_KEY, this._resetPasswordItem.bind(this));
+
this._entry = entry;
this._clipboard = St.Clipboard.get_default();
// Populate menu
let item;
item = new PopupMenu.PopupMenuItem(_("Copy"));
item.connect('activate', this._onCopyActivated.bind(this));
this.addMenuItem(item);
this._copyItem = item;
item = new PopupMenu.PopupMenuItem(_("Paste"));
item.connect('activate', this._onPasteActivated.bind(this));
this.addMenuItem(item);
this._pasteItem = item;
this._passwordItem = null;
Main.uiGroup.add_actor(this.actor);
this.actor.hide();
}
_makePasswordItem() {
let item = new PopupMenu.PopupMenuItem('');
item.connect('activate', this._onPasswordActivated.bind(this));
this.addMenuItem(item);
this._passwordItem = item;
this._updatePasswordItem();
}
_resetPasswordItem() {
- if (!this.isPassword) {
+ let passwordDisabled = this._lockdownSettings.get_boolean(DISABLE_SHOW_PASSWORD_KEY);
+
+ if (!this.isPassword || passwordDisabled) {
if (this._passwordItem) {
this._passwordItem.destroy();
this._passwordItem = null;
}
this._entry.clutter_text.set_password_char('\u25cf');
- } else {
+ } else if (this.isPassword && !passwordDisabled) {
if (!this._passwordItem)
this._makePasswordItem();
}
}
get isPassword() {
return this._entry.input_purpose == Clutter.InputContentPurpose.PASSWORD;
}
set isPassword(v) {
if (v == this.isPassword)
return;
if (v)
this._entry.input_purpose = Clutter.InputContentPurpose.PASSWORD;
else
this._entry.input_purpose = Clutter.InputContentPurpose.NORMAL;
this._resetPasswordItem();
}
open(animate) {
this._updatePasteItem();
this._updateCopyItem();
if (this._passwordItem)
this._updatePasswordItem();
super.open(animate);
this._entry.add_style_pseudo_class('focus');
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: gnome-shell
Version: 3.32.2
Release: 35%{?dist}
Release: 36%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@ -29,6 +29,10 @@ Patch21: caps-lock-warning.patch
Patch22: gdm-networking.patch
Patch23: 0001-shellEntry-Disconnect-handler-on-destroy.patch
Patch24: fix-login-lock-screen.patch
Patch25: 0001-shellEntry-Determine-if-password-entry-from-content-.patch
Patch26: 0002-shellEntry-Give-password-menu-item-text-when-it-s-cr.patch
Patch27: 0003-shellEntry-Handle-password-item-from-dedication-func.patch
Patch28: 0004-shellEntry-Support-lockdown-of-Show-Text-menu-in-pas.patch
# Misc.
Patch30: 0001-shellDBus-Add-a-DBus-method-to-load-a-single-extensi.patch
@ -89,9 +93,9 @@ Patch10004: 0004-background-refresh-background-on-gl-video-memory-pur.patch
%define gobject_introspection_version 1.49.1
%define gjs_version 1.54.0
%define gtk3_version 3.15.0
%define mutter_version 3.32
%define mutter_version 3.32.2-57
%define polkit_version 0.100
%define gsettings_desktop_schemas_version 3.32.0-3
%define gsettings_desktop_schemas_version 3.32.0-6
%define ibus_version 1.5.2
%define gnome_bluetooth_version 1:3.9.0
%define gstreamer_version 1.4.5
@ -259,6 +263,12 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de
%{_mandir}/man1/%{name}.1.gz
%changelog
* Tue Jul 20 2021 Ray Strode <rstrode@redhat.com> - 3.32.2-36
- Add ability to lock down password showing
Resolves: #1770302
- Add requires on newer mutter version
Related: #1937866
* Tue Jul 13 2021 Florian Müllner <fmuellner@redhat.com> - 3.32.2-35
- Improve style of window preview close buttons
Resolves: #1981420