1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-25 16:02:33 +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:
Carlos R. Mafra
2012-01-22 16:11:04 +00:00
parent c33455fdb4
commit cbe2f4e61a
3 changed files with 13 additions and 6 deletions

View File

@@ -23,11 +23,11 @@
#define WMROOTMENU_H
#include "WindowMaker.h"
#include "screen.h"
#include "menu.h"
typedef void *WRootMenuData;
typedef struct _WRootMenuReader {
Bool (*checkMenuChange)(char *path, time_t lastAccessTime);
@@ -41,4 +41,7 @@ typedef struct _WRootMenuReader {
void (*closeMenuFile)(WRootMenuData *data);
} WRootMenuReader;
void rebind_key_grabs(WScreen *scr);
WMenu *configureMenu(WScreen *scr, WMPropList *definition, Bool includeGlobals);
#endif /* WMROOTMENU_H */