CZ-NIC/run-or-raise

Keymap is null on Gnome 3.38.4

Closed this issue · 3 comments

jdeut commented

With const Keymap = Gdk.Keymap.get_default() the extension fails on Gnome 3.38.4 on Wayland (see appendix).

Commenting out

const Keymap = Gdk.Keymap.get_for_display(Gdk.Display.get_default())

as written in extension.js fixes the issue.

Appendix

JS ERROR: Extension run-or-raise@edvard.cz: TypeError: Keymap is null
get_state@/home/johannes/.local/share/gnome-shell/extensions/run-or-raise@edvard.cz/extension.js:583:17
enable/<@/home/johannes/.local/share/gnome-shell/extensions/run-or-raise@edvard.cz/extension.js:554:42
enable@/home/johannes/.local/share/gnome-shell/extensions/run-or-raise@edvard.cz/extension.js:551:22
enable@/home/johannes/.local/share/gnome-shell/extensions/run-or-raise@edvard.cz/extension.js:597:9
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:167:32
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:350:26
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:588:18
collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:28
_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:567:19
_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:597:18
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:628:18
init@resource:///org/gnome/shell/ui/extensionSystem.js:56:14
_initializeUI@resource:///org/gnome/shell/ui/main.js:269:22
start@resource:///org/gnome/shell/ui/main.js:159:5
@<main>:1:47
e3rd commented

Hello guys, I've finally submitted the patch that will try all three methods of the keyboard access. So that should finally work whether you have X11 / Wayland / new / old version of the Gnome shell. If you want, you may already test the version from the repository before the Gnome guys will approve it globally.

jdeut commented

Hello guys, I've finally submitted the patch that will try all three methods of the keyboard access. So that should finally work whether you have X11 / Wayland / new / old version of the Gnome shell. If you want, you may already test the version from the repository before the Gnome guys will approve it globally.

The extension starts and stops flawlessly now. Thank you :)

e3rd commented

Thanks a lot for testing!