Accepting request 155137 from GNOME:Factory
Revert previous patch because it caused lock screen and suspend to be blocked completely. (forwarded request 155129 from badshah400) OBS-URL: https://build.opensuse.org/request/show/155137 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-shell?expand=0&rev=68
This commit is contained in:
commit
6750401be6
@ -1,95 +0,0 @@
|
|||||||
From cdcebae636d80f53fc3fde02d1c026144042a6c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Giovanni Campagna <gcampagna@src.gnome.org>
|
|
||||||
Date: Mon, 26 Nov 2012 20:18:57 +0100
|
|
||||||
Subject: [PATCH] ScreenShield: try harder to become modal, and catch failures
|
|
||||||
|
|
||||||
The screenshield was not checking the return value of pushModal(), meaning
|
|
||||||
that it believed it was fully locked when it was not. Later, calling
|
|
||||||
popModal() would fail, causing an exception and blocking the unlock.
|
|
||||||
Now we do nothing for user initiated actions, and fail with an explanatory
|
|
||||||
message at idle time.
|
|
||||||
|
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=689106
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
js/ui/screenShield.js
|
|
||||||
---
|
|
||||||
js/ui/screenShield.js | 43 +++++++++++++++++++++++++++++++++----------
|
|
||||||
1 file changed, 33 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
Index: gnome-shell-3.6.2/js/ui/screenShield.js
|
|
||||||
===================================================================
|
|
||||||
--- gnome-shell-3.6.2.orig/js/ui/screenShield.js
|
|
||||||
+++ gnome-shell-3.6.2/js/ui/screenShield.js
|
|
||||||
@@ -441,6 +441,21 @@ const ScreenShield = new Lang.Class({
|
|
||||||
this.idleMonitor = Shell.IdleMonitor.get();
|
|
||||||
},
|
|
||||||
|
|
||||||
+ _becomeModal: function() {
|
|
||||||
+ if (this._isModal)
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ this._isModal = Main.pushModal(this.actor, { keybindingMode: Main.KeybindingMode.LOCK_SCREEN });
|
|
||||||
+ if (this._isModal)
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ // We failed to get a pointer grab, it means that
|
|
||||||
+ // something else has it. Try with a keyboard grab only
|
|
||||||
+ this._isModal = Main.pushModal(this.actor, { options: Meta.ModalOptions.POINTER_ALREADY_GRABBED,
|
|
||||||
+ keybindingMode: Main.KeybindingMode.LOCK_SCREEN });
|
|
||||||
+ return this._isModal;
|
|
||||||
+ },
|
|
||||||
+
|
|
||||||
_onLockScreenKeyRelease: function(actor, event) {
|
|
||||||
let symbol = event.get_key_symbol();
|
|
||||||
|
|
||||||
@@ -558,9 +573,17 @@ const ScreenShield = new Lang.Class({
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!this._isModal) {
|
|
||||||
- Main.pushModal(this.actor);
|
|
||||||
- this._isModal = true;
|
|
||||||
+ if (!this._becomeModal()) {
|
|
||||||
+ // We could not become modal, so we can't activate the
|
|
||||||
+ // screenshield. The user is probably very upset at this
|
|
||||||
+ // point, but any application using global grabs is broken
|
|
||||||
+ // Just tell him to stop using this app
|
|
||||||
+ //
|
|
||||||
+ // XXX: another option is to kick the user into the gdm login
|
|
||||||
+ // screen, where we're not affected by grabs
|
|
||||||
+ Main.notifyError(_("Failed to activate screen lock"),
|
|
||||||
+ _("The activation of the screen lock was blocked by an application that captured the keyboard."));
|
|
||||||
+ return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._isActive) {
|
|
||||||
@@ -598,9 +621,10 @@ const ScreenShield = new Lang.Class({
|
|
||||||
// Ensure that the stage window is mapped, before taking a grab
|
|
||||||
// otherwise X errors out
|
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
|
||||||
- if (!this._isModal) {
|
|
||||||
- Main.pushModal(this.actor);
|
|
||||||
- this._isModal = true;
|
|
||||||
+ if (!this._becomeModal()) {
|
|
||||||
+ // In the login screen, this is a hard error. Fail-whale
|
|
||||||
+ log('Could not acquire modal grab for the login screen. Aborting login process.');
|
|
||||||
+ Meta.quit(Meta.ExitCode.ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
@@ -854,9 +878,11 @@ const ScreenShield = new Lang.Class({
|
|
||||||
},
|
|
||||||
|
|
||||||
lock: function(animate) {
|
|
||||||
- if (!this._isModal) {
|
|
||||||
- Main.pushModal(this.actor);
|
|
||||||
- this._isModal = true;
|
|
||||||
+ // Warn the user if we can't become modal
|
|
||||||
+ if (!this._becomeModal()) {
|
|
||||||
+ Main.notifyError(_("Failed to activate screen lock"),
|
|
||||||
+ _("The screen lock is inhibited by an application capturing the keyboard."));
|
|
||||||
+ return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._activationTime == 0)
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 11 14:45:23 UTC 2013 - badshah400@gmail.com
|
||||||
|
|
||||||
|
- Remove gnome-shell-ScreenShield-become-modal-and-catch.patch: it
|
||||||
|
caused screen lock and suspend to fail completely.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 4 14:06:10 UTC 2013 - badshah400@gmail.com
|
Mon Feb 4 14:06:10 UTC 2013 - badshah400@gmail.com
|
||||||
|
|
||||||
|
@ -30,8 +30,6 @@ Patch1: gnome-shell-private-connection.patch
|
|||||||
Patch2: g-s-honor-lock-delay-GSettings.patch
|
Patch2: g-s-honor-lock-delay-GSettings.patch
|
||||||
# PATCH-FIX-UPSTREAM g-s-use-the-right-getter.patch bgo#691170 zaitor@opensuse.org -- org.gnome.desktop.screensaver lock-delay is an integer, not a boolean, so don't use get_bool() on it.
|
# PATCH-FIX-UPSTREAM g-s-use-the-right-getter.patch bgo#691170 zaitor@opensuse.org -- org.gnome.desktop.screensaver lock-delay is an integer, not a boolean, so don't use get_bool() on it.
|
||||||
Patch3: g-s-use-the-right-getter.patch
|
Patch3: g-s-use-the-right-getter.patch
|
||||||
# PATCH-FIX-UPSTREAM gnome-shell-ScreenShield-become-modal-and-catch.patch bnc#801797 bgo#689106 badshah400@gmail.com -- Fix an issue where the screen would not return to the desktop properly when resuming from screen lock; patch taken from the upstream bug and rebased
|
|
||||||
Patch4: gnome-shell-ScreenShield-become-modal-and-catch.patch
|
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: translation-update-upstream
|
BuildRequires: translation-update-upstream
|
||||||
@ -138,7 +136,6 @@ to enable, disable and install them.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
translation-update-upstream
|
translation-update-upstream
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user