This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via cbe2f4e61a12b6bb13469f1eac7df14bbf423128 (commit)
from c33455fdb4763391cd88ee124e138b118306403f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/cbe2f4e61a12b6bb13469f1eac7df14bbf423128
commit cbe2f4e61a12b6bb13469f1eac7df14bbf423128
Author: Carlos R. Mafra <[email protected]>
Date: Sun Jan 22 16:11:04 2012 +0000
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()...
diff --git a/src/defaults.c b/src/defaults.c
index dab5e64..70a372a 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -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");
diff --git a/src/rootmenu.c b/src/rootmenu.c
index cccbab8..9183380 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -50,6 +50,7 @@
#include "framewin.h"
#include "session.h"
#include "xmodifier.h"
+#include "rootmenu.h"
#include <WINGs/WUtil.h>
@@ -63,7 +64,6 @@ extern WPreferences wPreferences;
static WMenu *readMenuPipe(WScreen * scr, char **file_name);
static WMenu *readMenuFile(WScreen * scr, char *file_name);
static WMenu *readMenuDirectory(WScreen * scr, char *title, char **file_name,
char *command);
-static WMenu *configureMenu(WScreen * scr, WMPropList * definition, Bool
includeGlobals);
typedef struct Shortcut {
struct Shortcut *next;
@@ -379,7 +379,7 @@ void wRootMenuBindShortcuts(Window window)
}
}
-static void rebindKeygrabs(WScreen * scr)
+void rebind_key_grabs(WScreen *scr)
{
WWindow *wwin;
@@ -1479,7 +1479,7 @@ static WMenu *makeDefaultMenu(WScreen * scr)
*
*----------------------------------------------------------------------
*/
-static WMenu *configureMenu(WScreen * scr, WMPropList * definition, Bool
includeGlobals)
+WMenu *configureMenu(WScreen *scr, WMPropList *definition, Bool includeGlobals)
{
WMenu *menu = NULL;
WMPropList *elem;
@@ -1730,5 +1730,5 @@ void OpenRootMenu(WScreen * scr, int x, int y, int
keyboard)
}
if (scr->flags.root_menu_changed_shortcuts)
- rebindKeygrabs(scr);
+ rebind_key_grabs(scr);
}
diff --git a/src/rootmenu.h b/src/rootmenu.h
index e7ed855..7608536 100644
--- a/src/rootmenu.h
+++ b/src/rootmenu.h
@@ -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 */
-----------------------------------------------------------------------
Summary of changes:
src/defaults.c | 4 ++++
src/rootmenu.c | 8 ++++----
src/rootmenu.h | 7 +++++--
3 files changed, 13 insertions(+), 6 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].