mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Inotify: Reload keyboard shortcut definitions when configuration changes
Despite having the inotify mechanism compiled in my WM, everytime I changed a keyboard shortcut definition in the WMRootMenu via WPrefs I was required to open the WMRootMenu (eg with the F12 key) for the change to take effect...annoying. So explicitly reload the key bindings when a modification inside ~/GNUstep/Defaults/ is detected. As the inotify mechanism calls the function wDefaultsCheckDomains() when that happens, let's add a call to rebind_key_grabs() in there. Now it works fine and changes are automatically in effect once WPrefs writes the menu. PS: rebindKeygrabs() renamed to rebind_key_grabs()...
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
#include "dock.h"
|
||||
#include "workspace.h"
|
||||
#include "properties.h"
|
||||
#include "rootmenu.h"
|
||||
|
||||
#define MAX_SHORTCUT_LENGTH 32
|
||||
|
||||
@@ -998,6 +999,9 @@ void wDefaultsCheckDomains(void* arg)
|
||||
}
|
||||
WDRootMenu->dictionary = dict;
|
||||
wDefaultsMergeGlobalMenus(WDRootMenu);
|
||||
scr = wScreenWithNumber(0);
|
||||
configureMenu(scr, dict, True);
|
||||
rebind_key_grabs(scr);
|
||||
}
|
||||
} else {
|
||||
wwarning(_("could not load domain %s from user defaults database"), "WMRootMenu");
|
||||
|
||||
Reference in New Issue
Block a user