mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Revert "Inotify: Reload keyboard shortcut definitions when configuration changes"
This reverts commit cbe2f4e61a.
The reason for the revert is the regression reported here:
http://marc.info/?l=openbsd-ports&m=133151145814675&w=2
I've been able to reliably reproduce the double-spawning of
xterms I've been seeing. The bad news is that it still happens
even with a fresh configuration directory.
To reproduce:
0) Create a keyboard shortcut if one does not already exist (I'm
using <ctrl>+u set to spawn an xterm)
1) Open WindowMaker's preferences.
2) Click on "Applications Menu Definition" (it's the icon
immediately to the left of the keyboard icon)
3) Click save, and then close.
4) Keyboard shortcuts will spawn two applications.
I use keyboard shortcuts to spawn xterms, browsers, and filemanagers.
All of them spawn twice after performing the above. To fix it,
<F12> or <right-click> -> Exit -> Restart.
If I repeat steps 1-3, three windows will spawn. Repeat again and
four windows will spawn etc. (I stopped after getting five to
spawn at once).
This commit is contained in:
@@ -61,7 +61,6 @@
|
|||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "rootmenu.h"
|
|
||||||
|
|
||||||
#define MAX_SHORTCUT_LENGTH 32
|
#define MAX_SHORTCUT_LENGTH 32
|
||||||
|
|
||||||
@@ -1013,9 +1012,6 @@ void wDefaultsCheckDomains(void* arg)
|
|||||||
}
|
}
|
||||||
WDRootMenu->dictionary = dict;
|
WDRootMenu->dictionary = dict;
|
||||||
wDefaultsMergeGlobalMenus(WDRootMenu);
|
wDefaultsMergeGlobalMenus(WDRootMenu);
|
||||||
scr = wScreenWithNumber(0);
|
|
||||||
configureMenu(scr, dict, True);
|
|
||||||
rebind_key_grabs(scr);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
wwarning(_("could not load domain %s from user defaults database"), "WMRootMenu");
|
wwarning(_("could not load domain %s from user defaults database"), "WMRootMenu");
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
#include "framewin.h"
|
#include "framewin.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "xmodifier.h"
|
#include "xmodifier.h"
|
||||||
#include "rootmenu.h"
|
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
@@ -64,6 +63,7 @@ extern WPreferences wPreferences;
|
|||||||
static WMenu *readMenuPipe(WScreen * scr, char **file_name);
|
static WMenu *readMenuPipe(WScreen * scr, char **file_name);
|
||||||
static WMenu *readMenuFile(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 *readMenuDirectory(WScreen * scr, char *title, char **file_name, char *command);
|
||||||
|
static WMenu *configureMenu(WScreen * scr, WMPropList * definition, Bool includeGlobals);
|
||||||
|
|
||||||
typedef struct Shortcut {
|
typedef struct Shortcut {
|
||||||
struct Shortcut *next;
|
struct Shortcut *next;
|
||||||
@@ -377,7 +377,7 @@ void wRootMenuBindShortcuts(Window window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebind_key_grabs(WScreen *scr)
|
static void rebindKeygrabs(WScreen * scr)
|
||||||
{
|
{
|
||||||
WWindow *wwin;
|
WWindow *wwin;
|
||||||
|
|
||||||
@@ -1477,7 +1477,7 @@ static WMenu *makeDefaultMenu(WScreen * scr)
|
|||||||
*
|
*
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
WMenu *configureMenu(WScreen *scr, WMPropList *definition, Bool includeGlobals)
|
static WMenu *configureMenu(WScreen * scr, WMPropList * definition, Bool includeGlobals)
|
||||||
{
|
{
|
||||||
WMenu *menu = NULL;
|
WMenu *menu = NULL;
|
||||||
WMPropList *elem;
|
WMPropList *elem;
|
||||||
@@ -1728,5 +1728,5 @@ void OpenRootMenu(WScreen * scr, int x, int y, int keyboard)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (scr->flags.root_menu_changed_shortcuts)
|
if (scr->flags.root_menu_changed_shortcuts)
|
||||||
rebind_key_grabs(scr);
|
rebindKeygrabs(scr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
#define WMROOTMENU_H
|
#define WMROOTMENU_H
|
||||||
|
|
||||||
#include "WindowMaker.h"
|
#include "WindowMaker.h"
|
||||||
#include "screen.h"
|
|
||||||
#include "menu.h"
|
|
||||||
|
|
||||||
typedef void *WRootMenuData;
|
typedef void *WRootMenuData;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _WRootMenuReader {
|
typedef struct _WRootMenuReader {
|
||||||
Bool (*checkMenuChange)(char *path, time_t lastAccessTime);
|
Bool (*checkMenuChange)(char *path, time_t lastAccessTime);
|
||||||
|
|
||||||
@@ -41,7 +41,4 @@ typedef struct _WRootMenuReader {
|
|||||||
void (*closeMenuFile)(WRootMenuData *data);
|
void (*closeMenuFile)(WRootMenuData *data);
|
||||||
} WRootMenuReader;
|
} WRootMenuReader;
|
||||||
|
|
||||||
void rebind_key_grabs(WScreen *scr);
|
|
||||||
WMenu *configureMenu(WScreen *scr, WMPropList *definition, Bool includeGlobals);
|
|
||||||
|
|
||||||
#endif /* WMROOTMENU_H */
|
#endif /* WMROOTMENU_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user