[gnome-shell/wip/fmuellner/grabby-language-menu: 2/2] keyboard: Make items in language menu unfocusable
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/grabby-language-menu: 2/2] keyboard: Make items in language menu unfocusable
- Date: Sat, 9 Feb 2019 14:00:19 +0000 (UTC)
commit 9dacb1d0f8ea5b8c366acdfebf6da1fd9856ae26
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Sep 11 18:00:22 2018 +0200
keyboard: Make items in language menu unfocusable
The menu grabs the key focus when opened, which takes focus away from
whichever actor triggered the keyboard. And as the menu doesn't have
any text entries, the keyboard is popped down as a result.
Prevent this by making the menu items unfocusable, so the keyboard
focus just stays where it is. Considering that the menu is part
of the on-screen keyboard itself, not being keyboard-navigatable
isn't a big deal here.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/171
js/ui/keyboard.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index c8eb29719..bfddcdec9 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -189,16 +189,20 @@ var LanguageSelectionPopup = class extends PopupMenu.PopupMenu {
let inputSourceManager = InputSourceManager.getInputSourceManager();
let inputSources = inputSourceManager.inputSources;
+ let item;
for (let i in inputSources) {
let is = inputSources[i];
- this.addAction(is.displayName, () => {
+ item = this.addAction(is.displayName, () => {
inputSourceManager.activateInputSource(is, true);
});
+ item.actor.can_focus = false;
}
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.addSettingsAction(_("Region & Language Settings"), 'gnome-region-panel.desktop');
+ item = this.addSettingsAction(_("Region & Language Settings"), 'gnome-region-panel.desktop');
+ item.actor.can_focus = false;
+
this._capturedEventId = 0;
this._unmapId = actor.connect('notify::mapped', () => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]