[gnome-shell] keyboard: Disable emoji support on X11



commit a63ba61194dc7bba11e20809156183380312fdc0
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Apr 26 10:23:28 2019 +0200

    keyboard: Disable emoji support on X11
    
    Unlike regular keys that generate key events from a virtual device,
    emoji keys rely on the input method to insert the character. However
    as the compositor cannot inject IM events into ibus, this only works
    in the shell's own entries on X11.
    
    We shouldn't expose mostly broken functionality to the user, so limit
    the feature to the wayland session.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1172

 js/ui/keyboard.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index c19930f8d..71ebd5596 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1049,7 +1049,7 @@ var Keyboard = class Keyboard {
         this._a11yApplicationsSettings.connect('changed', this._syncEnabled.bind(this));
         this._lastDeviceId = null;
         this._suggestions = null;
-        this._emojiKeyVisible = true;
+        this._emojiKeyVisible = Meta.is_wayland_compositor();
 
         this._focusTracker = new FocusTracker();
         this._focusTracker.connect('position-changed', this._onFocusPositionChanged.bind(this));
@@ -1202,10 +1202,12 @@ var Keyboard = class Keyboard {
         this._keyboardNotifyId = this._keyboardController.connect('active-group', 
this._onGroupChanged.bind(this));
         this._keyboardGroupsChangedId = this._keyboardController.connect('groups-changed', 
this._onKeyboardGroupsChanged.bind(this));
         this._keyboardStateId = this._keyboardController.connect('panel-state', 
this._onKeyboardStateChanged.bind(this));
-        this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', 
this._onEmojiKeyVisible.bind(this));
         this._keypadVisibleId = this._keyboardController.connect('keypad-visible', 
this._onKeypadVisible.bind(this));
         this._focusNotifyId = global.stage.connect('notify::key-focus', this._onKeyFocusChanged.bind(this));
 
+        if (Meta.is_wayland_compositor())
+            this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', 
this._onEmojiKeyVisible.bind(this));
+
         this._relayout();
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]