From 1ac33b4620c1cecc9578eab50b92fbe2ee109673 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Fri, 19 May 2023 10:23:04 +1000 Subject: [PATCH] FIX: found root cause of keybind clashes! Was caused by method signature mismatch on Gtk.accelerator_parse. --- keybindings.js | 27 +-------------------------- settings.js | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/keybindings.js b/keybindings.js index d3d4cabc..d92737cf 100644 --- a/keybindings.js +++ b/keybindings.js @@ -575,32 +575,8 @@ function overrideAction(mutterName, action) { actionIdMap[id] = action; } -/** - * Disables known keybind clashes with default gnome operations. - */ -function disableKnownClashes() { - // disable specific actions known to cause issues - const mutterbinds = convenience.getSettings('org.gnome.mutter.keybindings'); - [ - 'toggle-tiled-left', 'toggle-tiled-right' - ].forEach(key => { - try { - mutterbinds.set_value(key, new GLib.Variant('as', [])); - } catch (e) {} - }); - - const wmbinds = convenience.getSettings('org.gnome.desktop.wm.keybindings'); - [ - 'switch-group', 'switch-group-backward', - 'switch-to-workspace-left', 'switch-to-workspace-right', - ].forEach(key => { - try { - wmbinds.set_value(key, new GLib.Variant('as', [])); - } catch (e) {} - }); -} - function resolveConflicts() { + resetConflicts(); for (let conflict of Settings.findConflicts()) { let {name, conflicts} = conflict; let action = byMutterName(name); @@ -734,7 +710,6 @@ function resetConflicts() { } function enable() { - disableKnownClashes(); let schemas = [...Settings.conflictSettings, convenience.getSettings(KEYBINDINGS_KEY)]; schemas.forEach(schema => { diff --git a/settings.js b/settings.js index 4ab95cdc..a4103f20 100644 --- a/settings.js +++ b/settings.js @@ -242,7 +242,7 @@ function keystrToKeycombo(keystr) { keystr = keystr.replace('Above_Tab', 'A'); aboveTab = true; } - let [key, mask] = Gtk.accelerator_parse(keystr); + let [accel, key, mask] = Gtk.accelerator_parse(keystr); if (aboveTab) key = META_KEY_ABOVE_TAB;