[gnome-shell/gbsneto/new-lock-screen-part2: 85/94] screenShield: Remove key press event handler
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/new-lock-screen-part2: 85/94] screenShield: Remove key press event handler
- Date: Mon, 20 Jan 2020 20:46:00 +0000 (UTC)
commit 81d588fdbcfdf1e64e197a7d86e8003b9a697b88
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Nov 29 14:33:26 2019 -0300
screenShield: Remove key press event handler
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
js/ui/screenShield.js | 31 -------------------------------
1 file changed, 31 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index c6b13995b5..00fc2ec463 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -53,8 +53,6 @@ var ScreenShield = class {
name: 'lockScreenGroup',
visible: false,
});
- this._lockScreenGroup.connect('key-press-event',
- this._onLockScreenKeyPress.bind(this));
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
this._lockDialogGroup = new St.Widget({ x_expand: true,
@@ -169,35 +167,6 @@ var ScreenShield = class {
return this._isModal;
}
- _onLockScreenKeyPress(actor, event) {
- let symbol = event.get_key_symbol();
- let unichar = event.get_key_unicode();
-
- // Do nothing if the lock screen is not fully shown.
- // This avoids reusing the previous (and stale) unlock
- // dialog if esc is pressed while the curtain is going
- // down after cancel.
-
- if (this._lockScreenState != MessageTray.State.SHOWN)
- return Clutter.EVENT_PROPAGATE;
-
- let isEnter = symbol == Clutter.KEY_Return ||
- symbol == Clutter.KEY_KP_Enter ||
- symbol == Clutter.KEY_ISO_Enter;
- let isEscape = symbol == Clutter.KEY_Escape;
- let isLiftChar = GLib.unichar_isprint(unichar) &&
- (this._isLocked || !GLib.unichar_isgraph(unichar));
- if (!isEnter && !isEscape && !isLiftChar)
- return Clutter.EVENT_PROPAGATE;
-
- if (this._isLocked &&
- this._ensureUnlockDialog(true) &&
- GLib.unichar_isgraph(unichar))
- this._dialog.addCharacter(unichar);
-
- return Clutter.EVENT_STOP;
- }
-
_syncInhibitor() {
let lockEnabled = this._settings.get_boolean(LOCK_ENABLED_KEY);
let lockLocked = this._lockSettings.get_boolean(DISABLE_LOCK_KEY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]