From 7b3dc69468e3cb97117b82036041afd9d89912e1 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 22 Feb 2014 21:37:29 +0100 Subject: Add keyboard/rebindOnMappingNotify option I have to switch to a qwerty layout to play steam games, and every time I switch back and forth, we lose some random bindings so I also had to reconfigure Openbox every time, now I don't. --- openbox/event.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'openbox/event.c') diff --git a/openbox/event.c b/openbox/event.c index 243f2078..9f560306 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -637,11 +637,13 @@ static void event_process(const XEvent *ec, gpointer data) else if (e->type == MappingNotify) { /* keyboard layout changes for modifier mapping changes. reload the modifier map, and rebind all the key bindings as appropriate */ - ob_debug("Keyboard map changed. Reloading keyboard bindings."); - ob_set_state(OB_STATE_RECONFIGURING); - obt_keyboard_reload(); - keyboard_rebind(); - ob_set_state(OB_STATE_RUNNING); + if (config_keyboard_rebind_on_mapping_notify) { + ob_debug("Keyboard map changed. Reloading keyboard bindings."); + ob_set_state(OB_STATE_RECONFIGURING); + obt_keyboard_reload(); + keyboard_rebind(); + ob_set_state(OB_STATE_RUNNING); + } } else if (e->type == ClientMessage) { /* This is for _NET_WM_REQUEST_FRAME_EXTENTS messages. They come for -- cgit v1.2.3