[gnome-shell/wip/rstrode/login-screen-extensions: 131/134] shellEntry: Determine if password entry from content purpose not menu item
- From: Ray Strode <halfline src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 131/134] shellEntry: Determine if password entry from content purpose not menu item
 
- Date: Thu, 26 Aug 2021 19:31:03 +0000 (UTC)
 
commit fd914db33873a8007098891119d22b6527af7d96
Author: Ray Strode <rstrode redhat com>
Date:   Wed Aug 21 15:01:34 2019 -0400
    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 53bd1daa1d..cac4ec9c25 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -41,7 +41,7 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
     }
 
     get isPassword() {
-        return this._passwordItem != null;
+        return this._entry.input_purpose == Clutter.InputContentPurpose.PASSWORD;
     }
 
     set isPassword(v) {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]