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
  discards  2d6c62549d38435772639b546037c9c07d643e5a (commit)
  discards  2e0abe9481e6eb6b3936cbae43b2dee493f1230d (commit)
  discards  aaaf73fa8358aeceb9382abaa86db0ef8108b9ae (commit)
  discards  b08a760d4a221ebc2cb15c4381b6383e05a44358 (commit)
  discards  01467300f870baa47686ec2c288d34bb925c58a7 (commit)
  discards  1fe265e72834f71b6f707968efcfc2fa35b312dc (commit)
  discards  4e5673f3fda01e2663bc1123df4078d159e4ea18 (commit)
  discards  fb54d3f3ef658ce55b45fce46108bc0e595a5ce7 (commit)
  discards  967d4fd8ff62fdbe554fac3db2bc07d712a2c5b7 (commit)
  discards  25715c6d820a372d6b5386a35a6eac7bcc9e8e16 (commit)
       via  3b85fca43cce31278662622222c37f2c4479510d (commit)
       via  18059fb1c76ff5c06ebc9c471114953959558b1f (commit)
       via  d9832e578f531a80e428fac0ed213814d815d3f2 (commit)
       via  f751cc6a507d69fa8d67b03ae2dbbf5f3031528f (commit)
       via  24ce829f7f839843421fdc4a2057dbba7be8580e (commit)
       via  a79c0e76d0a533a2fb5962fc835f1f7673cc2bdf (commit)
       via  6dcfdd072b38b68070e22581fbe47d94ebe6d850 (commit)
       via  3995130b791be804782680ab06f404e60dea92dd (commit)
       via  81aa311c42e6e6351ac6f9449a59bf32eb7441c2 (commit)
       via  c3c2d8d7f1bda6e86f75ec312a307da966019b54 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (2d6c62549d38435772639b546037c9c07d643e5a)
                         N -- N -- N (3b85fca43cce31278662622222c37f2c4479510d)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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/3b85fca43cce31278662622222c37f2c4479510d

commit 3b85fca43cce31278662622222c37f2c4479510d
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 23:55:56 2013 +0200

    configure: Added compilation check for dangerous use of 'extern' keyword

diff --git a/configure.ac b/configure.ac
index 77d16db..48c2637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,6 +102,11 @@ AS_IF([test "x$debug" = "xyes"],
      dnl Try to report misuses of '&' versus '&&' and similar
      AX_CFLAGS_GCC_OPTION([-Wlogical-op])
      dnl
+     dnl Reports declaration of global things that are done inside
+     dnl a local environment, instead of using the appropriate
+     dnl header
+     AX_CFLAGS_GCC_OPTION([-Wnested-externs])
+     dnl
      dnl Use of 'sizeof()' on inappropriate pointer types
      AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
 ], [dnl

http://repo.or.cz/w/wmaker-crm.git/commit/18059fb1c76ff5c06ebc9c471114953959558b1f

commit 18059fb1c76ff5c06ebc9c471114953959558b1f
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 23:55:55 2013 +0200

    wmaker: Moved definition of global variable 'wKeyBindings' to header
    
    Multiple declaration of global variables in local source files is
    a dangerous idea.

diff --git a/src/cycling.c b/src/cycling.c
index a1816dd..7a9afc9 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -38,8 +38,6 @@
 #include "xinerama.h"
 #include "switchpanel.h"
 
-/* Globals */
-extern WShortKey wKeyBindings[WKBD_LAST];
 
 static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin)
 {
diff --git a/src/defaults.c b/src/defaults.c
index 1eaa3cf..0fb2bbc 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -71,8 +71,6 @@
 #define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
 #endif
 
-/***** Global *****/
-extern WShortKey wKeyBindings[WKBD_LAST];
 
 typedef struct _WDefaultEntry  WDefaultEntry;
 typedef int (WDECallbackConvert) (WScreen *scr, WDefaultEntry *entry, 
WMPropList *plvalue, void *addr, void **tdata);
diff --git a/src/event.c b/src/event.c
index 31a82a3..6a34892 100644
--- a/src/event.c
+++ b/src/event.c
@@ -76,8 +76,6 @@
 #include "winmenu.h"
 #include "switchmenu.h"
 
-/******** Global Variables **********/
-extern WShortKey wKeyBindings[WKBD_LAST];
 
 #define MOD_MASK wPreferences.modifier_mask
 
diff --git a/src/keybind.h b/src/keybind.h
index bf02965..6576a16 100644
--- a/src/keybind.h
+++ b/src/keybind.h
@@ -128,6 +128,12 @@ typedef struct WShortKey {
     KeyCode keycode;
 } WShortKey;
 
+/* ---[ Global Variables ]------------------------------------------------ */
+
+extern WShortKey wKeyBindings[WKBD_LAST];
+
+/* ---[ Functions ]------------------------------------------------------- */
+
 void wKeyboardInitialize(void);
 
 #endif /* WMKEYBIND_H */
diff --git a/src/startup.c b/src/startup.c
index 915e065..90154d8 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -84,9 +84,6 @@
 # define SA_NODEFER 0
 #endif
 
-/****** Global Variables ******/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 /***** Local *****/
 static WScreen **wScreen = NULL;
 static unsigned int _NumLockMask = 0;
diff --git a/src/window.c b/src/window.c
index 7b3cda2..df7e6ca 100644
--- a/src/window.c
+++ b/src/window.c
@@ -72,8 +72,6 @@
 
 #define MOD_MASK wPreferences.modifier_mask
 
-/****** Global Variables ******/
-extern WShortKey wKeyBindings[WKBD_LAST];
 
 /***** Local Stuff *****/
 static WWindowState *windowState = NULL;
diff --git a/src/winmenu.c b/src/winmenu.c
index b4773a6..8201747 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -68,9 +68,6 @@
 #define WO_OMNIPRESENT         2
 #define WO_ENTRIES             3
 
-/**** Global data ***/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 
 static void updateOptionsMenu(WMenu * menu, WWindow * wwin);
 
diff --git a/src/workspace.c b/src/workspace.c
index 9455691..d02e9f7 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -59,7 +59,6 @@
 #define MAX_SHORTCUT_LENGTH 32
 #define WORKSPACE_NAME_DISPLAY_PADDING 32
 
-extern WShortKey wKeyBindings[WKBD_LAST];
 
 static WMPropList *dWorkspaces = NULL;
 static WMPropList *dClip, *dName;

http://repo.or.cz/w/wmaker-crm.git/commit/d9832e578f531a80e428fac0ed213814d815d3f2

commit d9832e578f531a80e428fac0ed213814d815d3f2
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 23:55:54 2013 +0200

    wmaker: Moved global domain definition to the global namespace
    
    The default domains were originally defined in different global
    variables in C files; This patches groups them in a single
    structure placed in global namespace.

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 46ba189..f4fa5b8 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -481,6 +481,14 @@ extern struct wmaker_global_variables {
 
        } timestamp;
 
+       /* Global Domains, for storing dictionaries */
+       struct {
+               /* Note: you must #include <defaults.h> if you want to use them 
*/
+               struct WDDomain *wmaker;
+               struct WDDomain *window_attr;
+               struct WDDomain *root_menu;
+       } domain;
+
        /* Screens related */
        int screen_count;
 
diff --git a/src/appicon.c b/src/appicon.c
index 4ccd3a4..ee6aed6 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -60,9 +60,6 @@
  * using the classname/instancename
  */
 
-/**** Global variables ****/
-extern WDDomain *WDWindowAttributes;
-
 #define MOD_MASK       wPreferences.modifier_mask
 #define ICON_SIZE      wPreferences.icon_size
 
@@ -1084,7 +1081,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
 /* This function save the application icon and store the path in the 
Dictionary */
 static void wApplicationSaveIconPathFor(const char *iconPath, const char 
*wm_instance, const char *wm_class)
 {
-       WMPropList *dict = WDWindowAttributes->dictionary;
+       WMPropList *dict = w_global.domain.window_attr->dictionary;
        WMPropList *adict, *key, *iconk;
        WMPropList *val;
        char *tmp;
@@ -1118,7 +1115,7 @@ static void wApplicationSaveIconPathFor(const char 
*iconPath, const char *wm_ins
        WMReleasePropList(iconk);
 
        if (val && !wPreferences.flags.noupdates)
-               UpdateDomainFile(WDWindowAttributes);
+               UpdateDomainFile(w_global.domain.window_attr);
 }
 
 static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
diff --git a/src/defaults.c b/src/defaults.c
index 705142d..1eaa3cf 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -72,9 +72,6 @@
 #endif
 
 /***** Global *****/
-extern WDDomain *WDWindowMaker;
-extern WDDomain *WDWindowAttributes;
-extern WDDomain *WDRootMenu;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 typedef struct _WDefaultEntry  WDefaultEntry;
@@ -971,21 +968,21 @@ void wDefaultsCheckDomains(void* arg)
        WMPropList *dict;
        int i;
 
-       if (stat(WDWindowMaker->path, &stbuf) >= 0 && WDWindowMaker->timestamp 
< stbuf.st_mtime) {
-               WDWindowMaker->timestamp = stbuf.st_mtime;
+       if (stat(w_global.domain.wmaker->path, &stbuf) >= 0 && 
w_global.domain.wmaker->timestamp < stbuf.st_mtime) {
+               w_global.domain.wmaker->timestamp = stbuf.st_mtime;
 
                /* Global dictionary */
                shared_dict = readGlobalDomain("WindowMaker", True);
 
                /* User dictionary */
-               dict = WMReadPropListFromFile(WDWindowMaker->path);
+               dict = WMReadPropListFromFile(w_global.domain.wmaker->path);
 
                if (dict) {
                        if (!WMIsPLDictionary(dict)) {
                                WMReleasePropList(dict);
                                dict = NULL;
                                wwarning(_("Domain %s (%s) of defaults database 
is corrupted!"),
-                                        "WindowMaker", WDWindowMaker->path);
+                                        "WindowMaker", 
w_global.domain.wmaker->path);
                        } else {
                                if (shared_dict) {
                                        WMMergePLDictionaries(shared_dict, 
dict, True);
@@ -1000,10 +997,10 @@ void wDefaultsCheckDomains(void* arg)
                                                wReadDefaults(scr, dict);
                                }
 
-                               if (WDWindowMaker->dictionary)
-                                       
WMReleasePropList(WDWindowMaker->dictionary);
+                               if (w_global.domain.wmaker->dictionary)
+                                       
WMReleasePropList(w_global.domain.wmaker->dictionary);
 
-                               WDWindowMaker->dictionary = dict;
+                               w_global.domain.wmaker->dictionary = dict;
                        }
                } else {
                        wwarning(_("could not load domain %s from user defaults 
database"), "WindowMaker");
@@ -1014,17 +1011,17 @@ void wDefaultsCheckDomains(void* arg)
 
        }
 
-       if (stat(WDWindowAttributes->path, &stbuf) >= 0 && 
WDWindowAttributes->timestamp < stbuf.st_mtime) {
+       if (stat(w_global.domain.window_attr->path, &stbuf) >= 0 && 
w_global.domain.window_attr->timestamp < stbuf.st_mtime) {
                /* global dictionary */
                shared_dict = readGlobalDomain("WMWindowAttributes", True);
                /* user dictionary */
-               dict = WMReadPropListFromFile(WDWindowAttributes->path);
+               dict = 
WMReadPropListFromFile(w_global.domain.window_attr->path);
                if (dict) {
                        if (!WMIsPLDictionary(dict)) {
                                WMReleasePropList(dict);
                                dict = NULL;
                                wwarning(_("Domain %s (%s) of defaults database 
is corrupted!"),
-                                        "WMWindowAttributes", 
WDWindowAttributes->path);
+                                        "WMWindowAttributes", 
w_global.domain.window_attr->path);
                        } else {
                                if (shared_dict) {
                                        WMMergePLDictionaries(shared_dict, 
dict, True);
@@ -1033,10 +1030,10 @@ void wDefaultsCheckDomains(void* arg)
                                        shared_dict = NULL;
                                }
 
-                               if (WDWindowAttributes->dictionary)
-                                       
WMReleasePropList(WDWindowAttributes->dictionary);
+                               if (w_global.domain.window_attr->dictionary)
+                                       
WMReleasePropList(w_global.domain.window_attr->dictionary);
 
-                               WDWindowAttributes->dictionary = dict;
+                               w_global.domain.window_attr->dictionary = dict;
                                for (i = 0; i < w_global.screen_count; i++) {
                                        scr = wScreenWithNumber(i);
                                        if (scr) {
@@ -1053,30 +1050,30 @@ void wDefaultsCheckDomains(void* arg)
                        wwarning(_("could not load domain %s from user defaults 
database"), "WMWindowAttributes");
                }
 
-               WDWindowAttributes->timestamp = stbuf.st_mtime;
+               w_global.domain.window_attr->timestamp = stbuf.st_mtime;
                if (shared_dict)
                        WMReleasePropList(shared_dict);
        }
 
-       if (stat(WDRootMenu->path, &stbuf) >= 0 && WDRootMenu->timestamp < 
stbuf.st_mtime) {
-               dict = WMReadPropListFromFile(WDRootMenu->path);
+       if (stat(w_global.domain.root_menu->path, &stbuf) >= 0 && 
w_global.domain.root_menu->timestamp < stbuf.st_mtime) {
+               dict = WMReadPropListFromFile(w_global.domain.root_menu->path);
                if (dict) {
                        if (!WMIsPLArray(dict) && !WMIsPLString(dict)) {
                                WMReleasePropList(dict);
                                dict = NULL;
                                wwarning(_("Domain %s (%s) of defaults database 
is corrupted!"),
-                                        "WMRootMenu", WDRootMenu->path);
+                                        "WMRootMenu", 
w_global.domain.root_menu->path);
                        } else {
-                               if (WDRootMenu->dictionary)
-                                       
WMReleasePropList(WDRootMenu->dictionary);
+                               if (w_global.domain.root_menu->dictionary)
+                                       
WMReleasePropList(w_global.domain.root_menu->dictionary);
 
-                               WDRootMenu->dictionary = dict;
-                               wDefaultsMergeGlobalMenus(WDRootMenu);
+                               w_global.domain.root_menu->dictionary = dict;
+                               
wDefaultsMergeGlobalMenus(w_global.domain.root_menu);
                        }
                } else {
                        wwarning(_("could not load domain %s from user defaults 
database"), "WMRootMenu");
                }
-               WDRootMenu->timestamp = stbuf.st_mtime;
+               w_global.domain.root_menu->timestamp = stbuf.st_mtime;
        }
 #ifndef HAVE_INOTIFY
        if (!arg)
@@ -1092,7 +1089,7 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
        int update_workspace_back = 0;  /* kluge :/ */
        unsigned int needs_refresh;
        void *tdata;
-       WMPropList *old_dict = (WDWindowMaker->dictionary != new_dict ? 
WDWindowMaker->dictionary : NULL);
+       WMPropList *old_dict = (w_global.domain.wmaker->dictionary != new_dict 
? w_global.domain.wmaker->dictionary : NULL);
 
        needs_refresh = 0;
 
@@ -1995,7 +1992,7 @@ getWSSpecificBackground(WScreen * scr, WDefaultEntry * 
entry, WMPropList * value
        if (!scr->flags.backimage_helper_launched && !scr->flags.startup) {
                WMPropList *key = WMCreatePLString("WorkspaceBack");
 
-               WMRemoveFromPLDictionary(WDWindowMaker->dictionary, key);
+               WMRemoveFromPLDictionary(w_global.domain.wmaker->dictionary, 
key);
 
                WMReleasePropList(key);
        }
diff --git a/src/dialog.c b/src/dialog.c
index 992078a..a00de06 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1454,8 +1454,6 @@ void wShowLegalPanel(WScreen * scr)
  ***********************************************************************
  */
 
-extern WDDomain *WDWindowAttributes;
-
 typedef struct _CrashPanel {
        WMWindow *win;          /* main window */
 
diff --git a/src/main.c b/src/main.c
index 478d791..ab738ab 100644
--- a/src/main.c
+++ b/src/main.c
@@ -76,11 +76,6 @@ struct WPreferences wPreferences;
 
 WShortKey wKeyBindings[WKBD_LAST];
 
-/* defaults domains */
-WDDomain *WDWindowMaker = NULL;
-WDDomain *WDWindowAttributes = NULL;
-WDDomain *WDRootMenu = NULL;
-
 /* notifications */
 const char WMNManaged[] = "WMNManaged";
 const char WMNUnmanaged[] = "WMNUnmanaged";
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 72ae878..10e2397 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -60,7 +60,6 @@
 
 #define MAX_SHORTCUT_LENGTH 32
 
-extern WDDomain *WDRootMenu;
 
 static WMenu *readMenuPipe(WScreen * scr, char **file_name);
 static WMenu *readPLMenuPipe(WScreen * scr, char **file_name);
@@ -1462,7 +1461,7 @@ static WMenu *configureMenu(WScreen * scr, WMPropList * 
definition, Bool include
 
                if (!scr->root_menu || stat_buf.st_mtime > 
scr->root_menu->timestamp
                    /* if the pointer in WMRootMenu has changed */
-                   || WDRootMenu->timestamp > scr->root_menu->timestamp) {
+                   || w_global.domain.root_menu->timestamp > 
scr->root_menu->timestamp) {
 
                        if (menu_is_default) {
                                wwarning(_
@@ -1472,7 +1471,7 @@ static WMenu *configureMenu(WScreen * scr, WMPropList * 
definition, Bool include
 
                        menu = readMenuFile(scr, path);
                        if (menu)
-                               menu->timestamp = WMAX(stat_buf.st_mtime, 
WDRootMenu->timestamp);
+                               menu->timestamp = WMAX(stat_buf.st_mtime, 
w_global.domain.root_menu->timestamp);
                } else {
                        menu = NULL;
                }
@@ -1617,17 +1616,17 @@ void OpenRootMenu(WScreen * scr, int x, int y, int 
keyboard)
                return;
        }
 
-       definition = WDRootMenu->dictionary;
+       definition = w_global.domain.root_menu->dictionary;
 
        /*
           definition = PLGetDomain(domain);
         */
        if (definition) {
                if (WMIsPLArray(definition)) {
-                       if (!scr->root_menu || WDRootMenu->timestamp > 
scr->root_menu->timestamp) {
+                       if (!scr->root_menu || 
w_global.domain.root_menu->timestamp > scr->root_menu->timestamp) {
                                menu = configureMenu(scr, definition, True);
                                if (menu)
-                                       menu->timestamp = WDRootMenu->timestamp;
+                                       menu->timestamp = 
w_global.domain.root_menu->timestamp;
 
                        } else
                                menu = NULL;
diff --git a/src/screen.c b/src/screen.c
index 32620af..c1fa714 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -69,11 +69,6 @@
     |SubstructureRedirectMask|ButtonPressMask|ButtonReleaseMask     
|KeyPressMask|KeyReleaseMask)
 
-/**** Global variables ****/
-
-extern WDDomain *WDWindowMaker;
-
-/**** Local ****/
 #define STIPPLE_WIDTH 2
 #define STIPPLE_HEIGHT 2
 static char STIPPLE_DATA[] = { 0x02, 0x01 };
@@ -619,7 +614,7 @@ WScreen *wScreenInit(int screen_number)
        scr->info_window = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 10, 
10, 0, 0, 0);
 
        /* read defaults for this screen */
-       wReadDefaults(scr, WDWindowMaker->dictionary);
+       wReadDefaults(scr, w_global.domain.wmaker->dictionary);
 
        {
                XColor xcol;
diff --git a/src/startup.c b/src/startup.c
index c6438ea..915e065 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -85,9 +85,6 @@
 #endif
 
 /****** Global Variables ******/
-extern WDDomain *WDWindowMaker;
-extern WDDomain *WDRootMenu;
-extern WDDomain *WDWindowAttributes;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 /***** Local *****/
@@ -560,13 +557,13 @@ void StartUp(Bool defaultScreenOnly)
        WMHookEventHandler(DispatchEvent);
 
        /* initialize defaults stuff */
-       WDWindowMaker = wDefaultsInitDomain("WindowMaker", True);
-       if (!WDWindowMaker->dictionary)
+       w_global.domain.wmaker = wDefaultsInitDomain("WindowMaker", True);
+       if (!w_global.domain.wmaker->dictionary)
                wwarning(_("could not read domain "%s" from defaults 
database"), "WindowMaker");
 
        /* read defaults that don't change until a restart and are
         * screen independent */
-       wReadStaticDefaults(WDWindowMaker ? WDWindowMaker->dictionary : NULL);
+       wReadStaticDefaults(w_global.domain.wmaker ? 
w_global.domain.wmaker->dictionary : NULL);
 
        /* check sanity of some values */
        if (wPreferences.icon_size < 16) {
@@ -576,14 +573,14 @@ void StartUp(Bool defaultScreenOnly)
        }
 
        /* init other domains */
-       WDRootMenu = wDefaultsInitDomain("WMRootMenu", False);
-       if (!WDRootMenu->dictionary)
+       w_global.domain.root_menu = wDefaultsInitDomain("WMRootMenu", False);
+       if (!w_global.domain.root_menu->dictionary)
                wwarning(_("could not read domain "%s" from defaults 
database"), "WMRootMenu");
 
-       wDefaultsMergeGlobalMenus(WDRootMenu);
+       wDefaultsMergeGlobalMenus(w_global.domain.root_menu);
 
-       WDWindowAttributes = wDefaultsInitDomain("WMWindowAttributes", True);
-       if (!WDWindowAttributes->dictionary)
+       w_global.domain.window_attr = wDefaultsInitDomain("WMWindowAttributes", 
True);
+       if (!w_global.domain.window_attr->dictionary)
                wwarning(_("could not read domain "%s" from defaults 
database"), "WMWindowAttributes");
 
        XSetErrorHandler((XErrorHandler) catchXError);
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 3378790..a181832 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -47,9 +47,6 @@
     if (value) {attr->flag = getBool(attrib, value);      if (mask) mask->flag 
= 1;}
 
-/* Global stuff */
-extern WDDomain *WDWindowAttributes;
-
 /* Local stuff */
 
 /* type converters */
@@ -177,8 +174,8 @@ static WMPropList *get_value_from_instanceclass(const char 
*value)
 
        WMPLSetCaseSensitive(True);
 
-       if (WDWindowAttributes->dictionary)
-               val = key ? 
WMGetFromPLDictionary(WDWindowAttributes->dictionary, key) : NULL;
+       if (w_global.domain.window_attr->dictionary)
+               val = key ? 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, key) : NULL;
 
        if (key)
                WMReleasePropList(key);
@@ -222,8 +219,8 @@ void wDefaultFillAttributes(const char *instance, const 
char *class,
 
        WMPLSetCaseSensitive(True);
 
-       if ((WDWindowAttributes->dictionary) && (useGlobalDefault))
-               da = WMGetFromPLDictionary(WDWindowAttributes->dictionary, 
AnyWindow);
+       if ((w_global.domain.window_attr->dictionary) && (useGlobalDefault))
+               da = 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, AnyWindow);
 
        /* get the data */
        value = get_value(dw, dc, dn, da, ANoTitlebar, No, useGlobalDefault);
@@ -331,7 +328,7 @@ static WMPropList *get_generic_value(const char *instance, 
const char *class,
                key = WMCreatePLString(buffer);
                wfree(buffer);
 
-               dict = WMGetFromPLDictionary(WDWindowAttributes->dictionary, 
key);
+               dict = 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, key);
                WMReleasePropList(key);
 
                if (dict)
@@ -342,7 +339,7 @@ static WMPropList *get_generic_value(const char *instance, 
const char *class,
        if (!value && instance) {
                key = WMCreatePLString(instance);
 
-               dict = WMGetFromPLDictionary(WDWindowAttributes->dictionary, 
key);
+               dict = 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, key);
                WMReleasePropList(key);
 
                if (dict)
@@ -353,7 +350,7 @@ static WMPropList *get_generic_value(const char *instance, 
const char *class,
        if (!value && class) {
                key = WMCreatePLString(class);
 
-               dict = WMGetFromPLDictionary(WDWindowAttributes->dictionary, 
key);
+               dict = 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, key);
                WMReleasePropList(key);
 
                if (dict)
@@ -363,7 +360,7 @@ static WMPropList *get_generic_value(const char *instance, 
const char *class,
        /* Search the default icon name - See default_icon argument! */
        if (!value && default_icon) {
                /* AnyWindow is "*" - see wdefaults.c */
-               dict = WMGetFromPLDictionary(WDWindowAttributes->dictionary, 
AnyWindow);
+               dict = 
WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, AnyWindow);
 
                if (dict)
                        value = WMGetFromPLDictionary(dict, option);
@@ -403,12 +400,12 @@ char *get_icon_filename(const char *winstance, const char 
*wclass, const char *c
                        wwarning(_("icon "%s" doesn't exist, check your config 
files"), file_name);
 
                /* FIXME: Here, if file_path don't exists, then the icon is in 
the
-                * "icon database" (WDWindowAttributes->dictionary), but the 
icon
+                * "icon database" (w_global.domain.window_attr->dictionary), 
but the icon
                 * is not en disk. Therefore, we should remove it from the icon
                 * database. Is possible to do that using wDefaultChangeIcon() 
*/
 
                /* Don't wfree(file_name) here, because is a pointer to the icon
-                * dictionary (WDWindowAttributes->dictionary) value. */
+                * dictionary (w_global.domain.window_attr->dictionary) value. 
*/
        }
 
        if (!file_path && default_icon)
@@ -491,7 +488,7 @@ int wDefaultGetStartWorkspace(WScreen *scr, const char 
*instance, const char *cl
        if (!ANoTitlebar)
                init_wdefaults();
 
-       if (!WDWindowAttributes->dictionary)
+       if (!w_global.domain.window_attr->dictionary)
                return -1;
 
        value = get_generic_value(instance, class, AStartWorkspace, True);
@@ -519,7 +516,7 @@ char *wDefaultGetIconFile(const char *instance, const char 
*class, Bool default_
        if (!ANoTitlebar)
                init_wdefaults();
 
-       if (!WDWindowAttributes || !WDWindowAttributes->dictionary)
+       if (!w_global.domain.window_attr || 
!w_global.domain.window_attr->dictionary)
                return NULL;
 
        value = get_generic_value(instance, class, AIcon, default_icon);
@@ -534,7 +531,7 @@ char *wDefaultGetIconFile(const char *instance, const char 
*class, Bool default_
 
 void wDefaultChangeIcon(WScreen *scr, const char *instance, const char *class, 
const char *file)
 {
-       WDDomain *db = WDWindowAttributes;
+       WDDomain *db = w_global.domain.window_attr;
        WMPropList *icon_value = NULL, *value, *attr, *key, *def_win, *def_icon 
= NULL;
        WMPropList *dict = db->dictionary;
        int same = 0;
@@ -611,15 +608,15 @@ void wDefaultPurgeInfo(WScreen *scr, const char 
*instance, const char *class)
        sprintf(buffer, "%s.%s", instance, class);
        key = WMCreatePLString(buffer);
 
-       dict = WMGetFromPLDictionary(WDWindowAttributes->dictionary, key);
+       dict = WMGetFromPLDictionary(w_global.domain.window_attr->dictionary, 
key);
 
        if (dict) {
                value = WMGetFromPLDictionary(dict, AIcon);
                if (value) {
                        WMRemoveFromPLDictionary(dict, AIcon);
                }
-               WMRemoveFromPLDictionary(WDWindowAttributes->dictionary, key);
-               UpdateDomainFile(WDWindowAttributes);
+               
WMRemoveFromPLDictionary(w_global.domain.window_attr->dictionary, key);
+               UpdateDomainFile(w_global.domain.window_attr);
        }
 
        wfree(buffer);
diff --git a/src/winspector.c b/src/winspector.c
index 3be4434..fd2a1ba 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -114,8 +114,6 @@ typedef struct InspectorPanel {
        unsigned int choosingIcon:1;
 } InspectorPanel;
 
-extern WDDomain *WDWindowAttributes;
-
 static InspectorPanel *panelList = NULL;
 static WMPropList *ANoTitlebar = NULL;
 static WMPropList *ANoResizebar;
@@ -430,7 +428,7 @@ insertAttribute(WMPropList *dict, WMPropList *window, 
WMPropList *attr, WMPropLi
 static void saveSettings(WMButton *button, InspectorPanel *panel)
 {
        WWindow *wwin = panel->inspected;
-       WDDomain *db = WDWindowAttributes;
+       WDDomain *db = w_global.domain.window_attr;
        WMPropList *dict = NULL;
        WMPropList *winDic, *appDic, *value, *value1, *key = NULL, *key2;
        char *icon_file, *buf1, *buf2;

http://repo.or.cz/w/wmaker-crm.git/commit/f751cc6a507d69fa8d67b03ae2dbbf5f3031528f

commit f751cc6a507d69fa8d67b03ae2dbbf5f3031528f
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 23:55:53 2013 +0200

    wmaker: Moved variable ValidModMask into the global namespace

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 27003d0..46ba189 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -613,6 +613,12 @@ extern struct wmaker_global_variables {
 
        /* Keyboard and shortcuts */
        struct {
+               /*
+                * Bit-mask to hide special key modifiers which we don't want to
+                * impact the shortcuts (typically: CapsLock, NumLock, 
ScrollLock)
+                */
+               unsigned int modifiers_mask;
+
                WMArray *windows[MAX_WINDOW_SHORTCUTS];
        } shortcut;
 
@@ -621,8 +627,6 @@ extern struct wmaker_global_variables {
 
 } w_global;
 
-extern unsigned int ValidModMask;
-
 /****** Notifications ******/
 extern const char WMNManaged[];
 extern const char WMNUnmanaged[];
diff --git a/src/cycling.c b/src/cycling.c
index 2542bfd..a1816dd 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -144,7 +144,7 @@ void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool 
next, Bool class_only)
                            | PointerMotionMask | ButtonReleaseMask | 
EnterWindowMask, &ev);
 
                /* ignore CapsLock */
-               modifiers = ev.xkey.state & ValidModMask;
+               modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
 
                if (!swpanel)
                        break;
diff --git a/src/event.c b/src/event.c
index 8629c6c..31a82a3 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1311,7 +1311,7 @@ static void handleKeyPress(XEvent * event)
 #endif                         /*KEEP_XKB_LOCK_STATUS */
 
        /* ignore CapsLock */
-       modifiers = event->xkey.state & ValidModMask;
+       modifiers = event->xkey.state & w_global.shortcut.modifiers_mask;
 
        for (i = 0; i < WKBD_LAST; i++) {
                if (wKeyBindings[i].keycode == 0)
diff --git a/src/main.c b/src/main.c
index b30970b..478d791 100644
--- a/src/main.c
+++ b/src/main.c
@@ -72,8 +72,6 @@ Display *dpy;
 
 char *ProgName;
 
-unsigned int ValidModMask = 0xff;
-
 struct WPreferences wPreferences;
 
 WShortKey wKeyBindings[WKBD_LAST];
@@ -538,6 +536,7 @@ int main(int argc, char **argv)
        w_global.timestamp.last_event = CurrentTime;
        w_global.timestamp.focus_change = CurrentTime;
        w_global.workspace.ignore_change = False;
+       w_global.shortcut.modifiers_mask = 0xff;
 
        /* setup common stuff for the monitor and wmaker itself */
        WMInitializeApplication("WindowMaker", &argc, argv);
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 22bc21c..72ae878 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -350,7 +350,7 @@ Bool wRootMenuPerformShortcut(XEvent * event)
        int done = 0;
 
        /* ignore CapsLock */
-       modifiers = event->xkey.state & ValidModMask;
+       modifiers = event->xkey.state & w_global.shortcut.modifiers_mask;
 
        for (ptr = shortcutList; ptr != NULL; ptr = ptr->next) {
                if (ptr->keycode == 0 || ptr->menu->menu->screen_ptr != scr)
diff --git a/src/startup.c b/src/startup.c
index a15190d..c6438ea 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -418,13 +418,13 @@ void StartUp(Bool defaultScreenOnly)
        /*
         * Ignore CapsLock in modifiers
         */
-       ValidModMask = 0xff & ~LockMask;
+       w_global.shortcut.modifiers_mask = 0xff & ~LockMask;
 
        getOffendingModifiers();
        /*
         * Ignore NumLock and ScrollLock too
         */
-       ValidModMask &= ~(_NumLockMask | _ScrollLockMask);
+       w_global.shortcut.modifiers_mask &= ~(_NumLockMask | _ScrollLockMask);
 
        memset(&wKeyBindings, 0, sizeof(wKeyBindings));
 
diff --git a/src/window.c b/src/window.c
index d1d7a5d..7b3cda2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2680,7 +2680,7 @@ static void resizebarMouseDown(WCoreWindow *sender, void 
*data, XEvent *event)
        }
 #endif
 
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        CloseWindowMenu(wwin->screen_ptr);
 
@@ -2714,7 +2714,7 @@ static void titlebarDblClick(WCoreWindow *sender, void 
*data, XEvent *event)
 {
        WWindow *wwin = data;
 
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        if (event->xbutton.button == Button1) {
                if (event->xbutton.state == 0) {
@@ -2778,7 +2778,7 @@ static void frameMouseDown(WObjDescriptor *desc, XEvent 
*event)
                resize_height_increment = wPreferences.resize_increment;
        }
 
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        CloseWindowMenu(wwin->screen_ptr);
 
@@ -2834,7 +2834,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void 
*data, XEvent *event)
                wwarning(_("The NumLock, ScrollLock or similar key seems to be 
turned on. "
                           "Turn it off or some mouse actions and keyboard 
shortcuts will not work."));
 #endif
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        CloseWindowMenu(wwin->screen_ptr);
 
@@ -2892,7 +2892,7 @@ static void windowCloseClick(WCoreWindow *sender, void 
*data, XEvent *event)
 {
        WWindow *wwin = data;
 
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        CloseWindowMenu(wwin->screen_ptr);
 
@@ -2955,7 +2955,7 @@ static void windowIconifyClick(WCoreWindow *sender, void 
*data, XEvent *event)
 {
        WWindow *wwin = data;
 
-       event->xbutton.state &= ValidModMask;
+       event->xbutton.state &= w_global.shortcut.modifiers_mask;
 
        CloseWindowMenu(wwin->screen_ptr);
 

http://repo.or.cz/w/wmaker-crm.git/commit/24ce829f7f839843421fdc4a2057dbba7be8580e

commit 24ce829f7f839843421fdc4a2057dbba7be8580e
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:27 2013 +0200

    wmaker: Removed global variable 'WDelayedActionSet' and associated dead code
    
    The variable's value was set to 0 but never changed afterwards, so
    the function using it would never do anything.

diff --git a/src/main.c b/src/main.c
index a99af1a..b30970b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -83,9 +83,6 @@ WDDomain *WDWindowMaker = NULL;
 WDDomain *WDWindowAttributes = NULL;
 WDDomain *WDRootMenu = NULL;
 
-/* special flags */
-char WDelayedActionSet = 0;
-
 /* notifications */
 const char WMNManaged[] = "WMNManaged";
 const char WMNUnmanaged[] = "WMNUnmanaged";
diff --git a/src/startup.c b/src/startup.c
index 8072463..a15190d 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -90,11 +90,6 @@ extern WDDomain *WDRootMenu;
 extern WDDomain *WDWindowAttributes;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-#ifndef HAVE_INOTIFY
-/* special flags */
-extern char WDelayedActionSet;
-#endif
-
 /***** Local *****/
 static WScreen **wScreen = NULL;
 static unsigned int _NumLockMask = 0;
@@ -143,28 +138,6 @@ static int handleXIO(Display * xio_dpy)
        return 0;
 }
 
-#ifndef HAVE_INOTIFY
-/*
- *----------------------------------------------------------------------
- * delayedAction-
- *      Action to be executed after the signal() handler is exited.
- *----------------------------------------------------------------------
- */
-static void delayedAction(void *cdata)
-{
-       if (WDelayedActionSet == 0)
-               return;
-
-       WDelayedActionSet--;
-       /*
-        * Make the event dispatcher do whatever it needs to do,
-        * including handling zombie processes, restart and exit
-        * signals.
-        */
-       DispatchEvent(NULL);
-}
-#endif
-
 /*
  *----------------------------------------------------------------------
  * handleExitSig--
@@ -528,12 +501,6 @@ void StartUp(Bool defaultScreenOnly)
        wPreferences.cursor[WCUR_EMPTY] = XCreatePixmapCursor(dpy, cur, cur, 
&black, &black, 0, 0);
        XFreePixmap(dpy, cur);
 
-
-#ifndef HAVE_INOTIFY
-       /* signal handler stuff that gets called when a signal is caught */
-       WMAddPersistentTimerHandler(500, delayedAction, NULL);
-#endif
-
        /* emergency exit... */
        sig_action.sa_handler = handleSig;
        sigemptyset(&sig_action.sa_mask);

http://repo.or.cz/w/wmaker-crm.git/commit/a79c0e76d0a533a2fb5962fc835f1f7673cc2bdf

commit a79c0e76d0a533a2fb5962fc835f1f7673cc2bdf
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:26 2013 +0200

    wmaker: Moved variables for Inotify into the global namespace

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index bcd128d..27003d0 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -522,6 +522,13 @@ extern struct wmaker_global_variables {
                struct WMenu *drawer_menu;      /* menu for the drawers */
        } dock;
 
+#ifdef HAVE_INOTIFY
+       struct {
+               int fd_event_queue;   /* Inotify's queue file descriptor */
+               int wd_defaults;   /* Watch Descriptor for the 'Defaults' 
configuration file */
+       } inotify;
+#endif
+
        /* definition for X Atoms */
        struct {
 
diff --git a/src/event.c b/src/event.c
index a68e619..8629c6c 100644
--- a/src/event.c
+++ b/src/event.c
@@ -358,13 +358,11 @@ noreturn void EventLoop(void)
 {
        XEvent event;
 #ifdef HAVE_INOTIFY
-       extern int inotifyFD;
-       extern int inotifyWD;
        struct timeval time;
        fd_set rfds;
        int retVal = 0;
 
-       if (inotifyFD < 0 || inotifyWD < 0)
+       if (w_global.inotify.fd_event_queue < 0 || w_global.inotify.wd_defaults 
< 0)
                retVal = -1;
 #endif
 
@@ -377,20 +375,21 @@ noreturn void EventLoop(void)
                        time.tv_sec = 0;
                        time.tv_usec = 0;
                        FD_ZERO(&rfds);
-                       FD_SET(inotifyFD, &rfds);
+                       FD_SET(w_global.inotify.fd_event_queue, &rfds);
 
                        /* check for available read data from inotify - don't 
block! */
-                       retVal = select(inotifyFD + 1, &rfds, NULL, NULL, 
&time);
+                       retVal = select(w_global.inotify.fd_event_queue + 1, 
&rfds, NULL, NULL, &time);
 
                        if (retVal < 0) {       /* an error has occured */
                                wwarning(_("select failed. The inotify instance 
will be closed."
                                           " Changes to the defaults database 
will require"
                                           " a restart to take effect."));
-                               close(inotifyFD);
+                               close(w_global.inotify.fd_event_queue);
+                               w_global.inotify.fd_event_queue = -1;
                                continue;
                        }
-                       if (FD_ISSET(inotifyFD, &rfds))
-                               handle_inotify_events(inotifyFD, inotifyWD);
+                       if (FD_ISSET(w_global.inotify.fd_event_queue, &rfds))
+                               
handle_inotify_events(w_global.inotify.fd_event_queue, 
w_global.inotify.wd_defaults);
                }
 #endif
        }
diff --git a/src/main.c b/src/main.c
index 29264e4..a99af1a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -74,11 +74,6 @@ char *ProgName;
 
 unsigned int ValidModMask = 0xff;
 
-#ifdef HAVE_INOTIFY
-int inotifyFD;
-int inotifyWD;
-#endif
-
 struct WPreferences wPreferences;
 
 WShortKey wKeyBindings[WKBD_LAST];
@@ -474,8 +469,9 @@ static void check_defaults(void)
 static void inotifyWatchConfig(void)
 {
        char *watchPath = NULL;
-       inotifyFD = inotify_init();     /* Initialise an inotify instance */
-       if (inotifyFD < 0) {
+
+       w_global.inotify.fd_event_queue = inotify_init();       /* Initialise 
an inotify instance */
+       if (w_global.inotify.fd_event_queue < 0) {
                wwarning(_("could not initialise an inotify instance."
                           " Changes to the defaults database will require"
                           " a restart to take effect. Check your kernel!"));
@@ -485,12 +481,13 @@ static void inotifyWatchConfig(void)
                 * but we might want more in the future so check all events for 
now.
                 * The individual events are checked for in event.c.
                 */
-               inotifyWD = inotify_add_watch(inotifyFD, watchPath, 
IN_ALL_EVENTS);
-               if (inotifyWD < 0) {
+               w_global.inotify.wd_defaults = 
inotify_add_watch(w_global.inotify.fd_event_queue, watchPath, IN_ALL_EVENTS);
+               if (w_global.inotify.wd_defaults < 0) {
                        wwarning(_("could not add an inotify watch on path %s."
                                   "Changes to the defaults database will 
require"
                                   " a restart to take effect."), watchPath);
-                       close(inotifyFD);
+                       close(w_global.inotify.fd_event_queue);
+                       w_global.inotify.fd_event_queue = -1;
                }
        }
        wfree(watchPath);
diff --git a/src/shutdown.c b/src/shutdown.c
index e6d3503..300a269 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -54,9 +54,6 @@ static void wipeDesktop(WScreen * scr);
 void Shutdown(WShutdownMode mode)
 {
        int i;
-#ifdef HAVE_INOTIFY
-       extern int inotifyFD;
-#endif
 
        switch (mode) {
        case WSLogoutMode:
@@ -65,7 +62,10 @@ void Shutdown(WShutdownMode mode)
                /* if there is no session manager, send SAVE_YOURSELF to
                 * the clients */
 #ifdef HAVE_INOTIFY
-               close(inotifyFD);
+               if (w_global.inotify.fd_event_queue >= 0) {
+                       close(w_global.inotify.fd_event_queue);
+                       w_global.inotify.fd_event_queue = -1;
+               }
 #endif
                for (i = 0; i < w_global.screen_count; i++) {
                        WScreen *scr;
@@ -92,7 +92,10 @@ void Shutdown(WShutdownMode mode)
                        WScreen *scr;
 
 #ifdef HAVE_INOTIFY
-                       close(inotifyFD);
+                       if (w_global.inotify.fd_event_queue >= 0) {
+                               close(w_global.inotify.fd_event_queue);
+                               w_global.inotify.fd_event_queue = -1;
+                       }
 #endif
                        scr = wScreenWithNumber(i);
                        if (scr) {

http://repo.or.cz/w/wmaker-crm.git/commit/6dcfdd072b38b68070e22581fbe47d94ebe6d850

commit 6dcfdd072b38b68070e22581fbe47d94ebe6d850
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:25 2013 +0200

    wmaker: Moved variables for the XRandR extension into the global namespace

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 5447eb8..bcd128d 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -586,6 +586,13 @@ extern struct wmaker_global_variables {
                } xkb;
 #endif
 
+#ifdef HAVE_XRANDR
+               struct {
+                       Bool supported;
+                       int event_base;
+               } randr;
+#endif
+
                /*
                 * If no extension were activated, we would end up with an empty
                 * structure, which old compilers may not appreciate, so let's
diff --git a/src/dialog.c b/src/dialog.c
index ef8e7b9..992078a 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1280,7 +1280,7 @@ void wShowInfoPanel(WScreen * scr)
 
 #ifdef HAVE_XRANDR
        strbuf = wstrappend(strbuf, ", XRandR ");
-       if (has_randr)
+       if (w_global.xext.randr.supported)
                strbuf = wstrappend(strbuf, _("(Supported)"));
        else
                strbuf = wstrappend(strbuf, _("(Unsupported)"));
diff --git a/src/event.c b/src/event.c
index 19934cd..a68e619 100644
--- a/src/event.c
+++ b/src/event.c
@@ -552,7 +552,7 @@ static void handleExtensions(XEvent * event)
        }
 #endif                         /*KEEP_XKB_LOCK_STATUS */
 #ifdef HAVE_XRANDR
-       if (has_randr && event->type == (randr_event_base + 
RRScreenChangeNotify)) {
+       if (w_global.xext.randr.supported && event->type == 
(w_global.xext.randr.event_base + RRScreenChangeNotify)) {
                /* From xrandr man page: "Clients must call back into Xlib using
                 * XRRUpdateConfiguration when screen configuration change 
notify
                 * events are generated */
diff --git a/src/screen.c b/src/screen.c
index d74f7ad..32620af 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -71,11 +71,6 @@
 
 /**** Global variables ****/
 
-#ifdef HAVE_XRANDR
-Bool has_randr;
-int randr_event_base;
-#endif
-
 extern WDDomain *WDWindowMaker;
 
 /**** Local ****/
@@ -550,7 +545,7 @@ WScreen *wScreenInit(int screen_number)
 #endif                         /* KEEP_XKB_LOCK_STATUS */
 
 #ifdef HAVE_XRANDR
-       if (has_randr)
+       if (w_global.xext.randr.supported)
                XRRSelectInput(dpy, scr->root_win, RRScreenChangeNotifyMask);
 #endif
 
diff --git a/src/screen.h b/src/screen.h
index cc7538a..bbf57c0 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -35,11 +35,6 @@
 #define WTB_PFOCUSED   4
 #define WTB_MENU 6
 
-#ifdef HAVE_XRANDR
-extern Bool has_randr;
-extern int randr_event_base;
-#endif
-
 typedef struct {
     WMRect *screens;
     int count;                 /* screen count, 0 = inactive */
diff --git a/src/startup.c b/src/startup.c
index 3e5b70d..8072463 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -627,7 +627,7 @@ void StartUp(Bool defaultScreenOnly)
 #endif
 
 #ifdef HAVE_XRANDR
-       has_randr = XRRQueryExtension(dpy, &randr_event_base, &dummy);
+       w_global.xext.randr.supported = XRRQueryExtension(dpy, 
&w_global.xext.randr.event_base, &dummy);
 #endif
 
 #ifdef KEEP_XKB_LOCK_STATUS

http://repo.or.cz/w/wmaker-crm.git/commit/3995130b791be804782680ab06f404e60dea92dd

commit 3995130b791be804782680ab06f404e60dea92dd
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:24 2013 +0200

    wmaker: Moved variables for the Xkb extension into the global namespace

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index da8093d..5447eb8 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -579,6 +579,13 @@ extern struct wmaker_global_variables {
                } shape;
 #endif
 
+#ifdef KEEP_XKB_LOCK_STATUS
+               struct {
+                       Bool supported;
+                       int event_base;
+               } xkb;
+#endif
+
                /*
                 * If no extension were activated, we would end up with an empty
                 * structure, which old compilers may not appreciate, so let's
diff --git a/src/event.c b/src/event.c
index 3968639..19934cd 100644
--- a/src/event.c
+++ b/src/event.c
@@ -81,10 +81,6 @@ extern WShortKey wKeyBindings[WKBD_LAST];
 
 #define MOD_MASK wPreferences.modifier_mask
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbEventBase;
-#endif
-
 /************ Local stuff ***********/
 
 static void saveTimestamp(XEvent *event);
@@ -551,7 +547,7 @@ static void handleExtensions(XEvent * event)
        }
 #endif
 #ifdef KEEP_XKB_LOCK_STATUS
-       if (wPreferences.modelock && (xkbevent->type == wXkbEventBase)) {
+       if (wPreferences.modelock && (xkbevent->type == 
w_global.xext.xkb.event_base)) {
                handleXkbIndicatorStateNotify(event);
        }
 #endif                         /*KEEP_XKB_LOCK_STATUS */
diff --git a/src/main.c b/src/main.c
index b668cf5..29264e4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -88,11 +88,6 @@ WDDomain *WDWindowMaker = NULL;
 WDDomain *WDWindowAttributes = NULL;
 WDDomain *WDRootMenu = NULL;
 
-#ifdef KEEP_XKB_LOCK_STATUS
-Bool wXkbSupported;
-int wXkbEventBase;
-#endif
-
 /* special flags */
 char WDelayedActionSet = 0;
 
diff --git a/src/screen.c b/src/screen.c
index 18c76f5..d74f7ad 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -71,10 +71,6 @@
 
 /**** Global variables ****/
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbSupported;
-#endif
-
 #ifdef HAVE_XRANDR
 Bool has_randr;
 int randr_event_base;
@@ -548,7 +544,7 @@ WScreen *wScreenInit(int screen_number)
        /* Only GroupLock doesn't work correctly in my system since right-alt
         * can change mode while holding it too - ]d
         */
-       if (wXkbSupported) {
+       if (w_global.xext.xkb.supported) {
                XkbSelectEvents(dpy, XkbUseCoreKbd, XkbStateNotifyMask, 
XkbStateNotifyMask);
        }
 #endif                         /* KEEP_XKB_LOCK_STATUS */
diff --git a/src/startup.c b/src/startup.c
index 4d6799f..3e5b70d 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -90,11 +90,6 @@ extern WDDomain *WDRootMenu;
 extern WDDomain *WDWindowAttributes;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern Bool wXkbSupported;
-extern int wXkbEventBase;
-#endif
-
 #ifndef HAVE_INOTIFY
 /* special flags */
 extern char WDelayedActionSet;
@@ -636,8 +631,8 @@ void StartUp(Bool defaultScreenOnly)
 #endif
 
 #ifdef KEEP_XKB_LOCK_STATUS
-       wXkbSupported = XkbQueryExtension(dpy, NULL, &wXkbEventBase, NULL, 
NULL, NULL);
-       if (wPreferences.modelock && !wXkbSupported) {
+       w_global.xext.xkb.supported = XkbQueryExtension(dpy, NULL, 
&w_global.xext.xkb.event_base, NULL, NULL, NULL);
+       if (wPreferences.modelock && !w_global.xext.xkb.supported) {
                wwarning(_("XKB is not supported. KbdModeLock is automatically 
disabled."));
                wPreferences.modelock = 0;
        }

http://repo.or.cz/w/wmaker-crm.git/commit/81aa311c42e6e6351ac6f9449a59bf32eb7441c2

commit 81aa311c42e6e6351ac6f9449a59bf32eb7441c2
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:23 2013 +0200

    wmaker: Moved variables for the XShape extension into the global namespace

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index eb72dcc..da8093d 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -570,6 +570,23 @@ extern struct wmaker_global_variables {
                XContext stack;
        } context;
 
+       /* X Extensions */
+       struct {
+#ifdef SHAPE
+               struct {
+                       Bool supported;
+                       int event_base;
+               } shape;
+#endif
+
+               /*
+                * If no extension were activated, we would end up with an empty
+                * structure, which old compilers may not appreciate, so let's
+                * work around this with a simple:
+                */
+               int dummy;
+       } xext;
+
        /* Session related */
        WMPropList *session_state;
 
diff --git a/src/client.c b/src/client.c
index 6ec7458..05b1049 100644
--- a/src/client.c
+++ b/src/client.c
@@ -44,11 +44,6 @@
 #include "wmspec.h"
 #include "misc.h"
 
-/****** Global Variables ******/
-
-#ifdef SHAPE
-extern Bool wShapeSupported;
-#endif
 
 /*
  *--------------------------------------------------------------------
@@ -172,7 +167,7 @@ void wClientConfigure(WWindow * wwin, 
XConfigureRequestEvent * xcre)
                return;
        }
 #ifdef SHAPE
-       if (wShapeSupported) {
+       if (w_global.xext.shape.supported) {
                int junk;
                unsigned int ujunk;
                int b_shaped;
diff --git a/src/event.c b/src/event.c
index 780bab2..3968639 100644
--- a/src/event.c
+++ b/src/event.c
@@ -81,11 +81,6 @@ extern WShortKey wKeyBindings[WKBD_LAST];
 
 #define MOD_MASK wPreferences.modifier_mask
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-extern int wShapeEventBase;
-#endif
-
 #ifdef KEEP_XKB_LOCK_STATUS
 extern int wXkbEventBase;
 #endif
@@ -551,7 +546,7 @@ static void handleExtensions(XEvent * event)
        xkbevent = (XkbEvent *) event;
 #endif                         /*KEEP_XKB_LOCK_STATUS */
 #ifdef SHAPE
-       if (wShapeSupported && event->type == (wShapeEventBase + ShapeNotify)) {
+       if (w_global.xext.shape.supported && event->type == 
(w_global.xext.shape.event_base + ShapeNotify)) {
                handleShapeNotify(event);
        }
 #endif
diff --git a/src/main.c b/src/main.c
index 79899a0..b668cf5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -88,11 +88,6 @@ WDDomain *WDWindowMaker = NULL;
 WDDomain *WDWindowAttributes = NULL;
 WDDomain *WDRootMenu = NULL;
 
-#ifdef SHAPE
-Bool wShapeSupported;
-int wShapeEventBase;
-#endif
-
 #ifdef KEEP_XKB_LOCK_STATUS
 Bool wXkbSupported;
 int wXkbEventBase;
diff --git a/src/startup.c b/src/startup.c
index eaa8634..4d6799f 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -90,11 +90,6 @@ extern WDDomain *WDRootMenu;
 extern WDDomain *WDWindowAttributes;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-extern int wShapeEventBase;
-#endif
-
 #ifdef KEEP_XKB_LOCK_STATUS
 extern Bool wXkbSupported;
 extern int wXkbEventBase;
@@ -633,7 +628,7 @@ void StartUp(Bool defaultScreenOnly)
 
 #ifdef SHAPE
        /* ignore j */
-       wShapeSupported = XShapeQueryExtension(dpy, &wShapeEventBase, &j);
+       w_global.xext.shape.supported = XShapeQueryExtension(dpy, 
&w_global.xext.shape.event_base, &j);
 #endif
 
 #ifdef HAVE_XRANDR
diff --git a/src/switchpanel.c b/src/switchpanel.c
index a0f2195..af32171 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -38,8 +38,6 @@
 
 #ifdef SHAPE
 #include <X11/extensions/shape.h>
-
-extern Bool wShapeSupported;
 #endif
 
 struct SwitchPanel {
@@ -522,7 +520,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow 
*curwin, Bool class_only)
                XSetWindowBackgroundPixmap(dpy, WMWidgetXID(panel->win), 
pixmap);
 
 #ifdef SHAPE
-               if (mask && wShapeSupported)
+               if (mask && w_global.xext.shape.supported)
                        XShapeCombineMask(dpy, WMWidgetXID(panel->win), 
ShapeBounding, 0, 0, mask, ShapeSet);
 #endif
                if (pixmap)
diff --git a/src/window.c b/src/window.c
index be5af54..d1d7a5d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -75,10 +75,6 @@
 /****** Global Variables ******/
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-#endif
-
 /***** Local Stuff *****/
 static WWindowState *windowState = NULL;
 static FocusMode getFocusMode(WWindow *wwin);
@@ -621,7 +617,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
        XSaveContext(dpy, window, w_global.context.client_win, (XPointer) & 
wwin->client_descriptor);
 
 #ifdef SHAPE
-       if (wShapeSupported) {
+       if (w_global.xext.shape.supported) {
                int junk;
                unsigned int ujunk;
                int b_shaped;
@@ -2042,7 +2038,7 @@ void wWindowConfigure(WWindow *wwin, int req_x, int 
req_y, int req_width, int re
                wwin->client.y += wwin->screen_ptr->frame_border_width;
        }
 #ifdef SHAPE
-       if (wShapeSupported && wwin->flags.shaped && resize)
+       if (w_global.xext.shape.supported && wwin->flags.shaped && resize)
                wWindowSetShape(wwin);
 #endif
 
@@ -2266,7 +2262,7 @@ void wWindowConfigureBorders(WWindow *wwin)
                        wFrameWindowHideButton(wwin->frame, flags);
 
 #ifdef SHAPE
-               if (wShapeSupported && wwin->flags.shaped)
+               if (w_global.xext.shape.supported && wwin->flags.shaped)
                        wWindowSetShape(wwin);
 #endif
        }

http://repo.or.cz/w/wmaker-crm.git/commit/c3c2d8d7f1bda6e86f75ec312a307da966019b54

commit c3c2d8d7f1bda6e86f75ec312a307da966019b54
Author: Christophe CURIS <[email protected]>
Date:   Thu Oct 10 20:38:22 2013 +0200

    wmaker: Moved variable Ignore Wks Change into the workspace object in the 
global namespace
    
    Took the opportunity to change its type: it was an integer, but it is
    actually holding a yes/no status, so it is now defined as a boolean.

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index c861a7d..eb72dcc 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -494,6 +494,13 @@ extern struct wmaker_global_variables {
 
                WMFont *font_for_name;  /* used during workspace switch */
 
+               /*
+                * Ignore Workspace Change:
+                * this variable is used to prevent workspace switch while 
certain
+                * operations are ongoing.
+                */
+               Bool ignore_change;
+
                /* Menus */
                struct WMenu *menu;     /* workspace operation */
                struct WMenu *submenu;  /* workspace list for window_menu */
diff --git a/src/actions.c b/src/actions.c
index 1b351f4..65eaa84 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -50,9 +50,6 @@
 #include "misc.h"
 #include "event.h"
 
-/****** Global Variables ******/
-
-int ignore_wks_change = 0;
 
 static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, 
int *new_y,
                                  unsigned int *new_width, unsigned int 
*new_height);
@@ -1199,7 +1196,7 @@ void wIconifyWindow(WWindow * wwin)
 void wDeiconifyWindow(WWindow *wwin)
 {
        /* Let's avoid changing workspace while deiconifying */
-       ignore_wks_change = 1;
+       w_global.workspace.ignore_change = True;
 
        /* we're hiding for show_desktop */
        int netwm_hidden = wwin->flags.net_show_desktop &&
@@ -1209,7 +1206,7 @@ void wDeiconifyWindow(WWindow *wwin)
                wWindowChangeWorkspace(wwin, w_global.workspace.current);
 
        if (!wwin->flags.miniaturized) {
-               ignore_wks_change = 0;
+               w_global.workspace.ignore_change = False;
                return;
        }
 
@@ -1220,7 +1217,7 @@ void wDeiconifyWindow(WWindow *wwin)
                        wDeiconifyWindow(owner);
                        wSetFocusTo(wwin->screen_ptr, wwin);
                        wRaiseFrame(wwin->frame->core);
-                       ignore_wks_change = 0;
+                       w_global.workspace.ignore_change = False;
                        return;
                }
        }
@@ -1309,7 +1306,7 @@ void wDeiconifyWindow(WWindow *wwin)
 
                        /* the window can disappear while 
ProcessPendingEvents() runs */
                        if (!wWindowFor(clientwin)) {
-                               ignore_wks_change = 0;
+                               w_global.workspace.ignore_change = False;
                                return;
                        }
                }
@@ -1325,7 +1322,7 @@ void wDeiconifyWindow(WWindow *wwin)
        if (!netwm_hidden)
                wUnshadeWindow(wwin);
 
-       ignore_wks_change = 0;
+       w_global.workspace.ignore_change = False;
 }
 
 static void hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int 
animate)
diff --git a/src/main.c b/src/main.c
index 8924a5d..79899a0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -553,6 +553,7 @@ int main(int argc, char **argv)
        w_global.program.signal_state = WSTATE_NORMAL;
        w_global.timestamp.last_event = CurrentTime;
        w_global.timestamp.focus_change = CurrentTime;
+       w_global.workspace.ignore_change = False;
 
        /* setup common stuff for the monitor and wmaker itself */
        WMInitializeApplication("WindowMaker", &argc, argv);
diff --git a/src/workspace.c b/src/workspace.c
index d959663..9455691 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -59,7 +59,6 @@
 #define MAX_SHORTCUT_LENGTH 32
 #define WORKSPACE_NAME_DISPLAY_PADDING 32
 
-extern int ignore_wks_change;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 static WMPropList *dWorkspaces = NULL;
@@ -441,7 +440,7 @@ void wWorkspaceRelativeChange(WScreen * scr, int amount)
         * still "flying" to its final position and we don't want to
         * change workspace before the animation finishes, otherwise
         * the window will land in the new workspace */
-       if (ignore_wks_change)
+       if (w_global.workspace.ignore_change)
                return;
 
        w = w_global.workspace.current + amount;

-----------------------------------------------------------------------

Summary of changes:
 src/main.c |    1 +
 1 files changed, 1 insertions(+), 0 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].

Reply via email to