Re: Fwd: wmaker 0.95.0+20111028-4 MIGRATED to testing

2012-01-26 Thread Rodolfo kix Garcia

On Thu, 26 Jan 2012 10:04:09 +0100, Andreas Tscharner wrote:

On 24.01.2012 17:46, Rodolfo kix Garcia wrote:

Hi,


[snip]

Fyi, wterm and fsviewer are now removed from debian unstable.


So I noticed. As I use fsviewer quite regularly, I didn't like it...

IIRC the problem was that fsviewer depends on libwraster and
libwraster is no longer used by WindowMaker so it was abandoned?

What about packaging fsviewer with libwraster?


Hi Andreas,

the problem was that the upstream developer of fsviewer (and wterm) 
don't replied the mails. Is missing in action, and for this reason the 
package cannot be updated. This was a problem because fsviewer requires 
libwmaker0-dev, and without libwmaker0-dev the wmaker package cannot be 
in testing. My idea wasn't remove the packages, but I didn't have other 
option. I talked about this with two Debian Developers, and they say the 
same; contact with the upstream, if he don't reply think if you want to 
be the new upstream, else, create a package remove request.


There are two different options now:

1. Include the libwmaker0-dev package in the upstream of fsviewer. Then 
the package libwmaker0-dev is provided by fsviewer source package.
2. Remove the libwmaker0-dev functions of fsviewer (rewrite fsviewer), 
therefore the package fsviewer won't need libwmaker0-dev


In both cases, probably you will be the new upstream. I didn't have 
more time for these packages (and I don't use them).


Best Regards,
kix


Best regards
Andreas


--
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Fwd: wmaker 0.95.0+20111028-4 MIGRATED to testing

2012-01-26 Thread Andreas Tscharner

On 26.01.2012 17:14, Rodolfo kix Garcia wrote:

[snip]

the problem was that the upstream developer of fsviewer (and wterm)
don't replied the mails. Is missing in action, and for this reason the
package cannot be updated. This was a problem because fsviewer requires
libwmaker0-dev, and without libwmaker0-dev the wmaker package cannot be
in testing. My idea wasn't remove the packages, but I didn't have other
option. I talked about this with two Debian Developers, and they say the
same; contact with the upstream, if he don't reply think if you want to
be the new upstream, else, create a package remove request.


I see.


There are two different options now:

1. Include the libwmaker0-dev package in the upstream of fsviewer. Then
the package libwmaker0-dev is provided by fsviewer source package.
2. Remove the libwmaker0-dev functions of fsviewer (rewrite fsviewer),
therefore the package fsviewer won't need libwmaker0-dev

In both cases, probably you will be the new upstream. I didn't have more


Well, before being new upstream, I have to manage to compile it. Where 
do I get an up-to-date libwmaker0-dev? It does not seem to be in Debian 
as a package of its own...


If I can compile it, maybe I am able to rewrite the code that depends on 
it...



time for these packages (and I don't use them).


I know. I am really grateful that you maintain the Debian wmaker 
package! Really!


Best regards
Andreas
--
  (`-''-/).___..--''`-._
   `o_ o  )   `-.  ( ).`-.__.`)
   (_Y_.)'  ._   )  `._ `. ``-..-'
 _..`--'_..-_/  /--'_.' .'
(il).-''  (li).'  ((!.-'

Andreas Tscharnera...@vis.ethz.ch
   http://www.vis.ethz.ch/~andy   ICQ-No. 14356454


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Patches

2012-01-26 Thread Paul Seelig
On 01/27/2012 12:21 AM, Rodolfo kix Garcia wrote:
 
 Sorry for the amount of files.
 
It is somehow strange to have such a generous code donor apologizing for
passing on such crown jewels as a gift to the whole world! :D

Just one word:

Thanks!

Best regards
Paul


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 01/24] WindowMaker: Display dpy externs removed

2012-01-26 Thread Rodolfo kix Garcia

From b99540302d4c8be6cd39629a2ac0938a471eaaac Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 02:21:18 +0100
Subject: [PATCH 01/24] WindowMaker: Display dpy externs removed

The Display variable dpy is moved to WindowMaker.h, therefore the externs can 
be removed.
---
 src/WindowMaker.h |2 +-
 src/main.c|2 --
 src/xmodifier.c   |3 +--
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 9e2c5f4..47e60f8 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -444,7 +444,7 @@ typedef struct WPreferences {
 
 
 /** Global Variables  **/
-extern Display *dpy;
+Display*dpy;
 extern char *ProgName;
 extern unsigned int ValidModMask;
 extern char WProgramState;
diff --git a/src/main.c b/src/main.c
index c17dcef..bc68fb7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,8 +62,6 @@
 
 /* general info */
 
-Display *dpy;
-
 char *ProgName;
 
 unsigned int ValidModMask = 0xff;
diff --git a/src/xmodifier.c b/src/xmodifier.c
index 7bae013..fad72eb 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -36,8 +36,7 @@ Perpetrator: Sudish Joseph s...@eng.mindspring.net, Sept. 
1997. */
 
 #include WINGs/WUtil.h
 #include xmodifier.h
-
-extern Display *dpy;
+#include WindowMaker.h
 
 //
 /*keymap handling   */
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From b99540302d4c8be6cd39629a2ac0938a471eaaac Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 02:21:18 +0100
Subject: [PATCH 01/24] WindowMaker: Display dpy externs removed

The Display variable dpy is moved to WindowMaker.h, therefore the externs can be removed.
---
 src/WindowMaker.h |2 +-
 src/main.c|2 --
 src/xmodifier.c   |3 +--
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 9e2c5f4..47e60f8 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -444,7 +444,7 @@ typedef struct WPreferences {
 
 
 /** Global Variables  **/
-extern Display	*dpy;
+Display	*dpy;
 extern char *ProgName;
 extern unsigned int ValidModMask;
 extern char WProgramState;
diff --git a/src/main.c b/src/main.c
index c17dcef..bc68fb7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,8 +62,6 @@
 
 /* general info */
 
-Display *dpy;
-
 char *ProgName;
 
 unsigned int ValidModMask = 0xff;
diff --git a/src/xmodifier.c b/src/xmodifier.c
index 7bae013..fad72eb 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -36,8 +36,7 @@ Perpetrator: Sudish Joseph s...@eng.mindspring.net, Sept. 1997. */
 
 #include WINGs/WUtil.h
 #include xmodifier.h
-
-extern Display *dpy;
+#include WindowMaker.h
 
 //
 /*keymap handling   */
-- 
1.7.2.3



[PATCH 03/24] WindowMaker: ValidModMask without extern

2012-01-26 Thread Rodolfo kix Garcia

From 3601890f4427549add3637d3cebe5a0b71c486a0 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 04:40:10 +0100
Subject: [PATCH 03/24] WindowMaker: ValidModMask without extern

The ValidModMask definition is now at WindowMaker.h and the extern is not 
needed.
---
 src/WindowMaker.h |2 +-
 src/main.c|4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 5c34810..b0b728b 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -445,7 +445,7 @@ typedef struct WPreferences {
 
 /** Global Variables  **/
 Display*dpy;
-extern unsigned int ValidModMask;
+unsigned int ValidModMask;
 extern char WProgramState;
 extern char WProgramSigState;
 
diff --git a/src/main.c b/src/main.c
index bc68fb7..04d11cd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,8 +64,6 @@
 
 char *ProgName;
 
-unsigned int ValidModMask = 0xff;
-
 #ifdef HAVE_INOTIFY
 int inotifyFD;
 int inotifyWD;
@@ -542,6 +540,8 @@ int main(int argc, char **argv)
int i_am_the_monitor, i, len;
char *str, *alt;
 
+   ValidModMask = 0xff;
+
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
 
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 3601890f4427549add3637d3cebe5a0b71c486a0 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 04:40:10 +0100
Subject: [PATCH 03/24] WindowMaker: ValidModMask without extern

The ValidModMask definition is now at WindowMaker.h and the extern is not needed.
---
 src/WindowMaker.h |2 +-
 src/main.c|4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 5c34810..b0b728b 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -445,7 +445,7 @@ typedef struct WPreferences {
 
 /** Global Variables  **/
 Display	*dpy;
-extern unsigned int ValidModMask;
+unsigned int ValidModMask;
 extern char WProgramState;
 extern char WProgramSigState;
 
diff --git a/src/main.c b/src/main.c
index bc68fb7..04d11cd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,8 +64,6 @@
 
 char *ProgName;
 
-unsigned int ValidModMask = 0xff;
-
 #ifdef HAVE_INOTIFY
 int inotifyFD;
 int inotifyWD;
@@ -542,6 +540,8 @@ int main(int argc, char **argv)
 	int i_am_the_monitor, i, len;
 	char *str, *alt;
 
+	ValidModMask = 0xff;
+
 	/* setup common stuff for the monitor and wmaker itself */
 	WMInitializeApplication(WindowMaker, argc, argv);
 
-- 
1.7.2.3



[PATCH 05/24] WindowMaker: WProgramSigState is now not extern

2012-01-26 Thread Rodolfo kix Garcia

From cc2380e34dba0844fa0345454fd7dd5cb3a19fd3 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 04:50:37 +0100
Subject: [PATCH 05/24] WindowMaker: WProgramSigState is now not extern

This variable is now in WindowMaker.h and is not extern now.
---
 src/WindowMaker.h |2 +-
 src/main.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 49ddf80..ad27c36 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -447,7 +447,7 @@ typedef struct WPreferences {
 Display*dpy;
 unsigned int ValidModMask;
 char WProgramState;
-extern char WProgramSigState;
+char WProgramSigState;
 
 
 /** Global Functions **/
diff --git a/src/main.c b/src/main.c
index fce01c6..073a5ab 100644
--- a/src/main.c
+++ b/src/main.c
@@ -144,7 +144,6 @@ int randr_event_base;
 #endif
 
 /* special flags */
-char WProgramSigState = 0;
 char WDelayedActionSet = 0;
 
 /* notifications */
@@ -541,6 +540,7 @@ int main(int argc, char **argv)
 
ValidModMask = 0xff;
WProgramState = WSTATE_NORMAL;
+   WProgramSigState = 0;
 
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From cc2380e34dba0844fa0345454fd7dd5cb3a19fd3 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 04:50:37 +0100
Subject: [PATCH 05/24] WindowMaker: WProgramSigState is now not extern

This variable is now in WindowMaker.h and is not extern now.
---
 src/WindowMaker.h |2 +-
 src/main.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 49ddf80..ad27c36 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -447,7 +447,7 @@ typedef struct WPreferences {
 Display	*dpy;
 unsigned int ValidModMask;
 char WProgramState;
-extern char WProgramSigState;
+char WProgramSigState;
 
 
 /** Global Functions **/
diff --git a/src/main.c b/src/main.c
index fce01c6..073a5ab 100644
--- a/src/main.c
+++ b/src/main.c
@@ -144,7 +144,6 @@ int randr_event_base;
 #endif
 
 /* special flags */
-char WProgramSigState = 0;
 char WDelayedActionSet = 0;
 
 /* notifications */
@@ -541,6 +540,7 @@ int main(int argc, char **argv)
 
 	ValidModMask = 0xff;
 	WProgramState = WSTATE_NORMAL;
+	WProgramSigState = 0;
 
 	/* setup common stuff for the monitor and wmaker itself */
 	WMInitializeApplication(WindowMaker, argc, argv);
-- 
1.7.2.3



[PATCH 06/24] WindowMaker: Notifications are now not extern.

2012-01-26 Thread Rodolfo kix Garcia

From ee76e10aff4346c23fa48bb50945d5d43fe5caed Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:00:11 +0100
Subject: [PATCH 06/24] WindowMaker: Notifications are now not extern.

The Notifications are defined now at WindowMaker.h, therefore the extern is not 
needed.
---
 src/WindowMaker.h |   29 ++---
 src/main.c|   34 +-
 2 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ad27c36..78c8cbf 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -455,19 +455,18 @@ extern void wAbort(Bool dumpCore);
 
 
 /** Notifications **/
-extern const char *WMNManaged;
-extern const char *WMNUnmanaged;
-extern const char *WMNChangedWorkspace;
-extern const char *WMNChangedState;
-extern const char *WMNChangedFocus;
-extern const char *WMNChangedStacking;
-extern const char *WMNChangedName;
-
-extern const char *WMNWorkspaceCreated;
-extern const char *WMNWorkspaceDestroyed;
-extern const char *WMNWorkspaceChanged;
-extern const char *WMNWorkspaceNameChanged;
-
-extern const char *WMNResetStacking;
+const char *WMNManaged;
+const char *WMNUnmanaged;
+const char *WMNChangedWorkspace;
+const char *WMNChangedState;
+const char *WMNChangedFocus;
+const char *WMNChangedStacking;
+const char *WMNChangedName;
+
+const char *WMNWorkspaceCreated;
+const char *WMNWorkspaceDestroyed;
+const char *WMNWorkspaceChanged;
+const char *WMNWorkspaceNameChanged;
+
+const char *WMNResetStacking;
 #endif
-
diff --git a/src/main.c b/src/main.c
index 073a5ab..d028045 100644
--- a/src/main.c
+++ b/src/main.c
@@ -145,23 +145,6 @@ int randr_event_base;
 
 /* special flags */
 char WDelayedActionSet = 0;
-
-/* notifications */
-const char *WMNManaged = WMNManaged;
-const char *WMNUnmanaged = WMNUnmanaged;
-const char *WMNChangedWorkspace = WMNChangedWorkspace;
-const char *WMNChangedState = WMNChangedState;
-const char *WMNChangedFocus = WMNChangedFocus;
-const char *WMNChangedStacking = WMNChangedStacking;
-const char *WMNChangedName = WMNChangedName;
-
-const char *WMNWorkspaceCreated = WMNWorkspaceCreated;
-const char *WMNWorkspaceDestroyed = WMNWorkspaceDestroyed;
-const char *WMNWorkspaceChanged = WMNWorkspaceChanged;
-const char *WMNWorkspaceNameChanged = WMNWorkspaceNameChanged;
-
-const char *WMNResetStacking = WMNResetStacking;
-
 / End Global Variables */
 
 static char *DisplayName = NULL;
@@ -542,6 +525,23 @@ int main(int argc, char **argv)
WProgramState = WSTATE_NORMAL;
WProgramSigState = 0;
 
+   /* notifications */
+   WMNManaged = WMNManaged;
+   WMNUnmanaged = WMNUnmanaged;
+   WMNChangedWorkspace = WMNChangedWorkspace;
+   WMNChangedState = WMNChangedState;
+   WMNChangedFocus = WMNChangedFocus;
+   WMNChangedStacking = WMNChangedStacking;
+   WMNChangedName = WMNChangedName;
+
+   WMNWorkspaceCreated = WMNWorkspaceCreated;
+   WMNWorkspaceDestroyed = WMNWorkspaceDestroyed;
+   WMNWorkspaceChanged = WMNWorkspaceChanged;
+   WMNWorkspaceNameChanged = WMNWorkspaceNameChanged;
+
+   WMNResetStacking = WMNResetStacking;
+
+
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
 
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From ee76e10aff4346c23fa48bb50945d5d43fe5caed Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:00:11 +0100
Subject: [PATCH 06/24] WindowMaker: Notifications are now not extern.

The Notifications are defined now at WindowMaker.h, therefore the extern is not needed.
---
 src/WindowMaker.h |   29 ++---
 src/main.c|   34 +-
 2 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ad27c36..78c8cbf 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -455,19 +455,18 @@ extern void wAbort(Bool dumpCore);
 
 
 /** Notifications **/
-extern const char *WMNManaged;
-extern const char *WMNUnmanaged;
-extern const char *WMNChangedWorkspace;
-extern const char *WMNChangedState;
-extern const char *WMNChangedFocus;
-extern const char *WMNChangedStacking;
-extern const char *WMNChangedName;
-
-extern const char *WMNWorkspaceCreated;
-extern const char *WMNWorkspaceDestroyed;
-extern const char *WMNWorkspaceChanged;
-extern const char *WMNWorkspaceNameChanged;
-
-extern const char *WMNResetStacking;
+const char *WMNManaged;
+const char *WMNUnmanaged;
+const char *WMNChangedWorkspace;
+const char *WMNChangedState;
+const char *WMNChangedFocus;
+const char *WMNChangedStacking;
+const char *WMNChangedName;
+
+const char *WMNWorkspaceCreated;
+const char *WMNWorkspaceDestroyed;
+const char *WMNWorkspaceChanged;
+const char *WMNWorkspaceNameChanged;
+
+const char *WMNResetStacking;
 #endif
-
diff 

[PATCH 07/24] WindowMaker: wAbort function declared in main.h

2012-01-26 Thread Rodolfo kix Garcia

From ba972b7a948a5dac80f60473ddd803f67c6def0d Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:07:21 +0100
Subject: [PATCH 07/24] WindowMaker: wAbort function declared in main.h

The function wAbort is moved to main.h (new file) and removed as extern in 
WindowMaker.h.
---
 src/Makefile.am   |1 +
 src/WindowMaker.h |7 ---
 src/main.c|1 +
 src/main.h|1 +
 src/screen.c  |1 +
 src/startup.c |1 +
 6 files changed, 5 insertions(+), 7 deletions(-)
 create mode 100644 src/main.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 0521d11..6d2729c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,6 +42,7 @@ wmaker_SOURCES =  \
icon.h \
keybind.h \
main.c \
+   main.h \
menu.c \
menu.h \
misc.c \
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 78c8cbf..a50b16f 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -441,19 +441,12 @@ typedef struct WPreferences {
 } flags;  /* internal flags */
 } WPreferences;
 
-
-
 /** Global Variables  **/
 Display*dpy;
 unsigned int ValidModMask;
 char WProgramState;
 char WProgramSigState;
 
-
-/** Global Functions **/
-extern void wAbort(Bool dumpCore);
-
-
 /** Notifications **/
 const char *WMNManaged;
 const char *WMNUnmanaged;
diff --git a/src/main.c b/src/main.c
index d028045..48c7040 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,7 @@
 
 #define MAINFILE
 
+#include main.h
 #include WindowMaker.h
 #include window.h
 #include funcs.h
diff --git a/src/main.h b/src/main.h
new file mode 100644
index 000..9ef4232
--- /dev/null
+++ b/src/main.h
@@ -0,0 +1 @@
+void wAbort(Bool dumpCore);
diff --git a/src/screen.c b/src/screen.c
index e2cda33..3bf9d25 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -61,6 +61,7 @@
 #include WINGs/WUtil.h
 
 #include defaults.h
+#include main.h
 
 #define EVENT_MASK (LeaveWindowMask|EnterWindowMask|PropertyChangeMask\
 |SubstructureNotifyMask|PointerMotionMask \
diff --git a/src/startup.c b/src/startup.c
index 149147c..bceda56 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -70,6 +70,7 @@
 #endif
 
 #include xutil.h
+#include main.h
 
 /* for SunOS */
 #ifndef SA_RESTART
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From ba972b7a948a5dac80f60473ddd803f67c6def0d Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:07:21 +0100
Subject: [PATCH 07/24] WindowMaker: wAbort function declared in main.h

The function wAbort is moved to main.h (new file) and removed as extern in WindowMaker.h.
---
 src/Makefile.am   |1 +
 src/WindowMaker.h |7 ---
 src/main.c|1 +
 src/main.h|1 +
 src/screen.c  |1 +
 src/startup.c |1 +
 6 files changed, 5 insertions(+), 7 deletions(-)
 create mode 100644 src/main.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 0521d11..6d2729c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,6 +42,7 @@ wmaker_SOURCES = 	\
 	icon.h \
 	keybind.h \
 	main.c \
+	main.h \
 	menu.c \
 	menu.h \
 	misc.c \
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 78c8cbf..a50b16f 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -441,19 +441,12 @@ typedef struct WPreferences {
 } flags;			   /* internal flags */
 } WPreferences;
 
-
-
 /** Global Variables  **/
 Display	*dpy;
 unsigned int ValidModMask;
 char WProgramState;
 char WProgramSigState;
 
-
-/** Global Functions **/
-extern void wAbort(Bool dumpCore);
-
-
 /** Notifications **/
 const char *WMNManaged;
 const char *WMNUnmanaged;
diff --git a/src/main.c b/src/main.c
index d028045..48c7040 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,7 @@
 
 #define MAINFILE
 
+#include main.h
 #include WindowMaker.h
 #include window.h
 #include funcs.h
diff --git a/src/main.h b/src/main.h
new file mode 100644
index 000..9ef4232
--- /dev/null
+++ b/src/main.h
@@ -0,0 +1 @@
+void wAbort(Bool dumpCore);
diff --git a/src/screen.c b/src/screen.c
index e2cda33..3bf9d25 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -61,6 +61,7 @@
 #include WINGs/WUtil.h
 
 #include defaults.h
+#include main.h
 
 #define EVENT_MASK (LeaveWindowMask|EnterWindowMask|PropertyChangeMask\
 |SubstructureNotifyMask|PointerMotionMask \
diff --git a/src/startup.c b/src/startup.c
index 149147c..bceda56 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -70,6 +70,7 @@
 #endif
 
 #include xutil.h
+#include main.h
 
 /* for SunOS */
 #ifndef SA_RESTART
-- 
1.7.2.3



[PATCH 08/24] WindowMaker: Atoms are defined in main.h

2012-01-26 Thread Rodolfo kix Garcia

From 9bc8cb3299c99a9be4386a1706f6627aadf6de9d Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:37:22 +0100
Subject: [PATCH 08/24] WindowMaker: Atoms are defined in main.h

The Atoms are defined now in main.h and included in the files that need them. 
Externs removed.
---
 src/actions.c |2 +-
 src/appmenu.c |2 +-
 src/client.c  |   10 +-
 src/event.c   |   12 +---
 src/main.c|   29 -
 src/main.h|   30 ++
 src/properties.c  |   15 +--
 src/screen.c  |2 --
 src/session.c |3 +--
 src/shutdown.c|2 +-
 src/startup.c |   23 ---
 src/switchpanel.c |3 +--
 src/window.c  |5 +
 src/winmenu.c |3 +--
 src/wmspec.c  |2 +-
 15 files changed, 41 insertions(+), 102 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index d7edf45..c7d1c37 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -45,6 +45,7 @@
 #include winspector.h
 #include workspace.h
 #include xinerama.h
+#include main.h
 
 /** Global Variables **/
 
@@ -52,7 +53,6 @@ int ignore_wks_change = 0;
 extern Time LastTimestamp;
 extern Time LastFocusChange;
 extern WPreferences wPreferences;
-extern Atom _XA_WM_TAKE_FOCUS;
 extern void ProcessPendingEvents();
 extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
 
diff --git a/src/appmenu.c b/src/appmenu.c
index 7c6e6a3..7a1b118 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -36,9 +36,9 @@
 #include funcs.h
 #include appmenu.h
 #include framewin.h
+#include main.h
 
 / Global Variables **/
-extern Atom _XA_WINDOWMAKER_MENU;
 extern Time LastTimestamp;
 extern WPreferences wPreferences;
 
diff --git a/src/client.c b/src/client.c
index 16a4f11..6cd8dc0 100644
--- a/src/client.c
+++ b/src/client.c
@@ -42,21 +42,13 @@
 #include appicon.h
 #include appmenu.h
 #include wmspec.h
+#include main.h
 
 /** Global Variables **/
 
 /* contexts */
 extern XContext wWinContext;
 
-extern Atom _XA_WM_STATE;
-extern Atom _XA_WM_PROTOCOLS;
-extern Atom _XA_WM_COLORMAP_WINDOWS;
-
-extern Atom _XA_WINDOWMAKER_MENU;
-
-extern Atom _XA_GNUSTEP_WM_ATTR;
-extern Atom _XA_GNUSTEP_WM_RESIZEBAR;
-
 #ifdef SHAPE
 extern Bool wShapeSupported;
 #endif
diff --git a/src/event.c b/src/event.c
index e45cdc2..d541521 100644
--- a/src/event.c
+++ b/src/event.c
@@ -66,6 +66,7 @@
 #include balloon.h
 #include xinerama.h
 #include wmspec.h
+#include main.h
 
 / Global Variables **/
 extern XContext wWinContext;
@@ -82,17 +83,6 @@ extern WPreferences wPreferences;
 
 #define MOD_MASK wPreferences.modifier_mask
 
-extern Atom _XA_WM_COLORMAP_NOTIFY;
-
-extern Atom _XA_WM_CHANGE_STATE;
-extern Atom _XA_WM_DELETE_WINDOW;
-extern Atom _XA_GNUSTEP_WM_ATTR;
-extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
-extern Atom _XA_GNUSTEP_TITLEBAR_STATE;
-extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
-extern Atom _XA_WINDOWMAKER_COMMAND;
-extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;
-
 #ifdef SHAPE
 extern Bool wShapeSupported;
 extern int wShapeEventBase;
diff --git a/src/main.c b/src/main.c
index 48c7040..a2695bb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -92,35 +92,6 @@ XContext wAppWinContext;
 XContext wStackContext;
 XContext wVEdgeContext;
 
-/* Atoms */
-Atom _XA_WM_STATE;
-Atom _XA_WM_CHANGE_STATE;
-Atom _XA_WM_PROTOCOLS;
-Atom _XA_WM_TAKE_FOCUS;
-Atom _XA_WM_DELETE_WINDOW;
-Atom _XA_WM_SAVE_YOURSELF;
-Atom _XA_WM_CLIENT_LEADER;
-Atom _XA_WM_COLORMAP_WINDOWS;
-Atom _XA_WM_COLORMAP_NOTIFY;
-
-Atom _XA_GNUSTEP_WM_ATTR;
-Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
-Atom _XA_GNUSTEP_WM_RESIZEBAR;
-Atom _XA_GNUSTEP_TITLEBAR_STATE;
-
-Atom _XA_WINDOWMAKER_MENU;
-Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
-Atom _XA_WINDOWMAKER_STATE;
-
-Atom _XA_WINDOWMAKER_WM_FUNCTION;
-Atom _XA_WINDOWMAKER_NOTICEBOARD;
-Atom _XA_WINDOWMAKER_COMMAND;
-
-Atom _XA_WINDOWMAKER_ICON_SIZE;
-Atom _XA_WINDOWMAKER_ICON_TILE;
-
-Atom _XA_WM_IGNORE_FOCUS_EVENTS;
-
 /* cursors */
 Cursor wCursor[WCUR_LAST];
 
diff --git a/src/main.h b/src/main.h
index 9ef4232..f73179e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1 +1,31 @@
 void wAbort(Bool dumpCore);
+
+/* Atoms */
+Atom _XA_WM_STATE;
+Atom _XA_WM_CHANGE_STATE;
+Atom _XA_WM_PROTOCOLS;
+Atom _XA_WM_TAKE_FOCUS;
+Atom _XA_WM_DELETE_WINDOW;
+Atom _XA_WM_SAVE_YOURSELF;
+Atom _XA_WM_CLIENT_LEADER;
+Atom _XA_WM_COLORMAP_WINDOWS;
+Atom _XA_WM_COLORMAP_NOTIFY;
+
+Atom _XA_GNUSTEP_WM_ATTR;
+Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
+Atom _XA_GNUSTEP_WM_RESIZEBAR;
+Atom _XA_GNUSTEP_TITLEBAR_STATE;
+
+Atom _XA_WINDOWMAKER_MENU;
+Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
+Atom _XA_WINDOWMAKER_STATE;
+
+Atom _XA_WINDOWMAKER_WM_FUNCTION;
+Atom _XA_WINDOWMAKER_NOTICEBOARD;
+Atom _XA_WINDOWMAKER_COMMAND;
+
+Atom _XA_WINDOWMAKER_ICON_SIZE;
+Atom _XA_WINDOWMAKER_ICON_TILE;
+
+Atom _XA_WM_IGNORE_FOCUS_EVENTS;
+
diff --git a/src/properties.c b/src/properties.c
index 

[PATCH 09/24] WindowMaker: WPreferences declared as global in WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From eef26c73389a21d6bbd3b3f7b8f9647d0114a54b Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 05:50:52 +0100
Subject: [PATCH 09/24] WindowMaker: WPreferences declared as global in 
WindowMaker.h

WPreferences is declared as global in WindowMaker.h and therefore the externs 
are not needed.
---
 src/WindowMaker.h |1 +
 src/actions.c |1 -
 src/appicon.c |1 -
 src/application.c |2 --
 src/appmenu.c |1 -
 src/balloon.c |2 --
 src/client.c  |1 -
 src/cycling.c |2 --
 src/defaults.c|1 -
 src/dialog.c  |2 --
 src/dock.c|1 -
 src/dockedapp.c   |3 ---
 src/event.c   |2 --
 src/framewin.c|2 --
 src/icon.c|2 --
 src/main.c|2 --
 src/menu.c|2 --
 src/misc.c|3 ---
 src/monitor.c |3 ---
 src/moveres.c |1 -
 src/placement.c   |2 --
 src/rootmenu.c|1 -
 src/screen.c  |2 --
 src/stacking.c|2 --
 src/startup.c |1 -
 src/superfluous.c |2 --
 src/switchmenu.c  |3 ---
 src/switchpanel.c |2 --
 src/texture.c |2 --
 src/usermenu.c|2 --
 src/wcore.c   |3 ---
 src/wdefaults.c   |1 -
 src/window.c  |1 -
 src/winmenu.c |2 --
 src/winspector.c  |1 -
 src/wmspec.c  |1 -
 src/workspace.c   |1 -
 37 files changed, 1 insertions(+), 63 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index a50b16f..a3f5212 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -443,6 +443,7 @@ typedef struct WPreferences {
 
 /** Global Variables  **/
 Display*dpy;
+WPreferences wPreferences;
 unsigned int ValidModMask;
 char WProgramState;
 char WProgramSigState;
diff --git a/src/actions.c b/src/actions.c
index c7d1c37..133879d 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -52,7 +52,6 @@
 int ignore_wks_change = 0;
 extern Time LastTimestamp;
 extern Time LastFocusChange;
-extern WPreferences wPreferences;
 extern void ProcessPendingEvents();
 extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
 
diff --git a/src/appicon.c b/src/appicon.c
index b08c8f1..f0c654a 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -54,7 +54,6 @@
 
 / Global variables /
 extern Cursor wCursor[WCUR_LAST];
-extern WPreferences wPreferences;
 
 #define MOD_MASK   wPreferences.modifier_mask
 
diff --git a/src/application.c b/src/application.c
index 8f64770..8a06859 100644
--- a/src/application.c
+++ b/src/application.c
@@ -54,8 +54,6 @@
 
 extern XContext wAppWinContext;
 extern XContext wWinContext;
-extern WPreferences wPreferences;
-
 extern WDDomain *WDWindowAttributes;
 
 / Local variables /
diff --git a/src/appmenu.c b/src/appmenu.c
index 7a1b118..2bbaafe 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -40,7 +40,6 @@
 
 / Global Variables **/
 extern Time LastTimestamp;
-extern WPreferences wPreferences;
 
 typedef struct {
short code;
diff --git a/src/balloon.c b/src/balloon.c
index a4e8aaf..2cfe8bb 100644
--- a/src/balloon.c
+++ b/src/balloon.c
@@ -43,8 +43,6 @@
 #include workspace.h
 #include balloon.h
 
-extern WPreferences wPreferences;
-
 typedef struct _WBalloon {
Window window;
 
diff --git a/src/client.c b/src/client.c
index 6cd8dc0..9663e7f 100644
--- a/src/client.c
+++ b/src/client.c
@@ -574,7 +574,6 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * 
event)
wAppMenuDestroy(wapp-menu);
}
if (wwin-fake_group) {
-   extern WPreferences wPreferences;
WScreen *scr = wwin-screen_ptr;
WWindow *foo = scr-focused_window;
WFakeGroupLeader *fPtr = 
wwin-fake_group;
diff --git a/src/cycling.c b/src/cycling.c
index 0b0dc7c..3b21884 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -39,8 +39,6 @@
 #include switchpanel.h
 
 /* Globals */
-extern WPreferences wPreferences;
-
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin)
diff --git a/src/defaults.c b/src/defaults.c
index dab5e64..dd35cd6 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -73,7 +73,6 @@ extern WDDomain *WDWindowMaker;
 extern WDDomain *WDWindowAttributes;
 extern WDDomain *WDRootMenu;
 extern int wScreenCount;
-extern WPreferences wPreferences;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 typedef struct {
diff --git a/src/dialog.c b/src/dialog.c
index 904eac3..286e059 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -59,8 +59,6 @@
 #include actions.h
 #include xinerama.h
 
-extern WPreferences wPreferences;
-
 static WMPoint getCenter(WScreen * scr, int width, int height)
 {
return wGetPointToCenterRectInHead(scr, 

[PATCH 11/24] WindowMaker: externs in superfluous are not needed

2012-01-26 Thread Rodolfo kix Garcia

From cf9c5bfc3bfd32d663fb83b49ed3258f42f80ab7 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:26:55 +0100
Subject: [PATCH 11/24] WindowMaker: externs in superfluous are not needed

The functions in superfluous.h are declared as externs, but they don't need the 
extern.
---
 src/superfluous.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/superfluous.h b/src/superfluous.h
index 8811843..d6987ac 100644
--- a/src/superfluous.h
+++ b/src/superfluous.h
@@ -23,7 +23,7 @@
 
 #define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE))
 
-extern void DoKaboom(WScreen *scr, Window win, int x, int y);
-extern Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
-extern Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
+void DoKaboom(WScreen *scr, Window win, int x, int y);
+Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
+Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
 #endif /* WMSUPERFLUOUS_H */
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From cf9c5bfc3bfd32d663fb83b49ed3258f42f80ab7 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:26:55 +0100
Subject: [PATCH 11/24] WindowMaker: externs in superfluous are not needed

The functions in superfluous.h are declared as externs, but they don't need the extern.
---
 src/superfluous.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/superfluous.h b/src/superfluous.h
index 8811843..d6987ac 100644
--- a/src/superfluous.h
+++ b/src/superfluous.h
@@ -23,7 +23,7 @@
 
 #define PIECES ((64/ICON_KABOOM_PIECE_SIZE)*(64/ICON_KABOOM_PIECE_SIZE))
 
-extern void DoKaboom(WScreen *scr, Window win, int x, int y);
-extern Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
-extern Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
+void DoKaboom(WScreen *scr, Window win, int x, int y);
+Pixmap MakeGhostDock(WDock *dock, int sx, int dx, int y);
+Pixmap MakeGhostIcon(WScreen *scr, Drawable drawable);
 #endif /* WMSUPERFLUOUS_H */
-- 
1.7.2.3



[PATCH 12/24] WindowMaker: KEEP_XKB_LOCK_STATUS variables moved to WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From 8f96129c0eb92102cc4879f20a743c4f736b1a29 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:33:18 +0100
Subject: [PATCH 12/24] WindowMaker: KEEP_XKB_LOCK_STATUS variables moved to 
WindowMaker.h

The variables used for keep xkb lock status are moved to WindowMaker.h and now 
are not extern.
---
 src/WindowMaker.h |7 +--
 src/event.c   |4 
 src/main.c|5 -
 src/screen.c  |3 ---
 src/startup.c |5 -
 5 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index de5b411..17f98b9 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -295,8 +295,6 @@ enum {
 WColorSettings = 1  2
 };
 
-
-
 typedef struct {
 int x1, y1;
 int x2, y2;
@@ -449,6 +447,11 @@ unsigned int ValidModMask;
 char WProgramState;
 char WProgramSigState;
 
+#ifdef KEEP_XKB_LOCK_STATUS
+Bool wXkbSupported;
+int wXkbEventBase;
+#endif
+
 /** Notifications **/
 const char *WMNManaged;
 const char *WMNUnmanaged;
diff --git a/src/event.c b/src/event.c
index 8effde5..a7d6d26 100644
--- a/src/event.c
+++ b/src/event.c
@@ -84,10 +84,6 @@ extern Bool wShapeSupported;
 extern int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 extern Bool has_randr;
 extern int randr_event_base;
diff --git a/src/main.c b/src/main.c
index bd751f0..649e466 100644
--- a/src/main.c
+++ b/src/main.c
@@ -100,11 +100,6 @@ Bool wShapeSupported;
 int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-Bool wXkbSupported;
-int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 Bool has_randr;
 int randr_event_base;
diff --git a/src/screen.c b/src/screen.c
index 6e37d68..4bad564 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -71,9 +71,6 @@
 / Global variables /
 extern int wScreenCount;
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbSupported;
-#endif
 #ifdef HAVE_XRANDR
 extern int has_randr;
 #endif
diff --git a/src/startup.c b/src/startup.c
index d307ee3..53cd208 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -94,11 +94,6 @@ extern Bool wShapeSupported;
 extern int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern Bool wXkbSupported;
-extern int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 extern Bool has_randr;
 extern int randr_event_base;
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 8f96129c0eb92102cc4879f20a743c4f736b1a29 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:33:18 +0100
Subject: [PATCH 12/24] WindowMaker: KEEP_XKB_LOCK_STATUS variables moved to WindowMaker.h

The variables used for keep xkb lock status are moved to WindowMaker.h and now are not extern.
---
 src/WindowMaker.h |7 +--
 src/event.c   |4 
 src/main.c|5 -
 src/screen.c  |3 ---
 src/startup.c |5 -
 5 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index de5b411..17f98b9 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -295,8 +295,6 @@ enum {
 WColorSettings = 1  2
 };
 
-
-
 typedef struct {
 int x1, y1;
 int x2, y2;
@@ -449,6 +447,11 @@ unsigned int ValidModMask;
 char WProgramState;
 char WProgramSigState;
 
+#ifdef KEEP_XKB_LOCK_STATUS
+Bool wXkbSupported;
+int wXkbEventBase;
+#endif
+
 /** Notifications **/
 const char *WMNManaged;
 const char *WMNUnmanaged;
diff --git a/src/event.c b/src/event.c
index 8effde5..a7d6d26 100644
--- a/src/event.c
+++ b/src/event.c
@@ -84,10 +84,6 @@ extern Bool wShapeSupported;
 extern int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 extern Bool has_randr;
 extern int randr_event_base;
diff --git a/src/main.c b/src/main.c
index bd751f0..649e466 100644
--- a/src/main.c
+++ b/src/main.c
@@ -100,11 +100,6 @@ Bool wShapeSupported;
 int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-Bool wXkbSupported;
-int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 Bool has_randr;
 int randr_event_base;
diff --git a/src/screen.c b/src/screen.c
index 6e37d68..4bad564 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -71,9 +71,6 @@
 / Global variables /
 extern int wScreenCount;
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern int wXkbSupported;
-#endif
 #ifdef HAVE_XRANDR
 extern int has_randr;
 #endif
diff --git a/src/startup.c b/src/startup.c
index d307ee3..53cd208 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -94,11 +94,6 @@ extern Bool wShapeSupported;
 extern int wShapeEventBase;
 #endif
 
-#ifdef KEEP_XKB_LOCK_STATUS
-extern Bool wXkbSupported;
-extern int wXkbEventBase;
-#endif
-
 #ifdef HAVE_XRANDR
 extern Bool has_randr;
 extern int randr_event_base;
-- 
1.7.2.3



[PATCH 13/24] WindowMaker: X Contexts are defined in WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From 24c83de0d3a3071281cb5b0f217264d49a5d07e6 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:42:17 +0100
Subject: [PATCH 13/24] WindowMaker: X Contexts are defined in WindowMaker.h

The XContext variables are defined in WindowMaker.h, therefore the externs are 
not needed.
---
 src/WindowMaker.h |7 +++
 src/application.c |3 ---
 src/client.c  |3 ---
 src/dock.c|1 -
 src/event.c   |3 ---
 src/main.c|6 --
 src/menu.c|4 
 src/stacking.c|3 ---
 src/startup.c |6 --
 src/wcore.c   |2 --
 src/window.c  |3 ---
 src/workspace.c   |1 -
 12 files changed, 7 insertions(+), 35 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 17f98b9..d74240f 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -467,4 +467,11 @@ const char *WMNWorkspaceChanged;
 const char *WMNWorkspaceNameChanged;
 
 const char *WMNResetStacking;
+
+/* XContexts */
+XContext wWinContext;
+XContext wAppWinContext;
+XContext wStackContext;
+XContext wVEdgeContext;
+
 #endif
diff --git a/src/application.c b/src/application.c
index 8a06859..863fed7 100644
--- a/src/application.c
+++ b/src/application.c
@@ -51,9 +51,6 @@
 #include xinerama.h
 
 / Global variables /
-
-extern XContext wAppWinContext;
-extern XContext wWinContext;
 extern WDDomain *WDWindowAttributes;
 
 / Local variables /
diff --git a/src/client.c b/src/client.c
index 9663e7f..3d9fabb 100644
--- a/src/client.c
+++ b/src/client.c
@@ -46,9 +46,6 @@
 
 /** Global Variables **/
 
-/* contexts */
-extern XContext wWinContext;
-
 #ifdef SHAPE
 extern Bool wShapeSupported;
 #endif
diff --git a/src/dock.c b/src/dock.c
index 8fb1f89..df2892b 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -64,7 +64,6 @@
 /* in dockedapp.c */
 extern void DestroyDockAppSettingsPanel();
 extern void ShowDockAppSettingsPanel(WAppIcon * aicon);
-extern XContext wWinContext;
 extern void appIconMouseDown(WObjDescriptor *desc, XEvent *event);
 
 #define MOD_MASK wPreferences.modifier_mask
diff --git a/src/event.c b/src/event.c
index a7d6d26..2ec63a6 100644
--- a/src/event.c
+++ b/src/event.c
@@ -69,9 +69,6 @@
 #include main.h
 
 / Global Variables **/
-extern XContext wWinContext;
-extern XContext wVEdgeContext;
-
 extern WShortKey wKeyBindings[WKBD_LAST];
 extern int wScreenCount;
 extern Time LastTimestamp;
diff --git a/src/main.c b/src/main.c
index 649e466..b223a0e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -84,12 +84,6 @@ WDDomain *WDWindowMaker = NULL;
 WDDomain *WDWindowAttributes = NULL;
 WDDomain *WDRootMenu = NULL;
 
-/* XContexts */
-XContext wWinContext;
-XContext wAppWinContext;
-XContext wStackContext;
-XContext wVEdgeContext;
-
 /* last event timestamp for XSetInputFocus */
 Time LastTimestamp = CurrentTime;
 /* timestamp on the last time we did XSetInputFocus() */
diff --git a/src/menu.c b/src/menu.c
index 6679f66..894ab2e 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -44,10 +44,6 @@
 #include workspace.h
 #include dialog.h
 
-/** Global Variables **/
-
-extern XContext wWinContext;
-
 #define MOD_MASK wPreferences.modifier_mask
 
 #define MENU_SCROLL_STEP  
menuScrollParameters[(int)wPreferences.menu_scroll_speed].steps
diff --git a/src/stacking.c b/src/stacking.c
index 11875c3..d6403e4 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -36,9 +36,6 @@
 #include stacking.h
 #include workspace.h
 
-/*** Global Variables ***/
-extern XContext wStackContext;
-
 static void notifyStackChange(WCoreWindow * frame, char *detail)
 {
WWindow *wwin = wWindowFor(frame-window);
diff --git a/src/startup.c b/src/startup.c
index 53cd208..5640e92 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -99,12 +99,6 @@ extern Bool has_randr;
 extern int randr_event_base;
 #endif
 
-/* contexts */
-extern XContext wWinContext;
-extern XContext wAppWinContext;
-extern XContext wStackContext;
-extern XContext wVEdgeContext;
-
 #ifndef HAVE_INOTIFY
 /* special flags */
 extern char WDelayedActionSet;
diff --git a/src/wcore.c b/src/wcore.c
index 3e6fe78..3198298 100644
--- a/src/wcore.c
+++ b/src/wcore.c
@@ -29,8 +29,6 @@
 #include WindowMaker.h
 #include wcore.h
 
-extern XContext wWinContext;
-
 /*
  *--
  * wCoreCreateTopLevel--
diff --git a/src/window.c b/src/window.c
index a2aa136..836a1ad 100644
--- a/src/window.c
+++ b/src/window.c
@@ -73,9 +73,6 @@ extern WShortKey wKeyBindings[WKBD_LAST];
 extern Bool wShapeSupported;
 #endif
 
-/* contexts */
-extern XContext wWinContext;
-
 /* protocol atoms */
 extern Time LastTimestamp;
 
diff --git a/src/workspace.c b/src/workspace.c
index f9e89bf..53c61c7 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -53,7 +53,6 @@
 #define WORKSPACE_NAME_DISPLAY_PADDING 32
 
 extern int ignore_wks_change;
-extern XContext wVEdgeContext;
 extern void ProcessPendingEvents();
 
 

[PATCH 14/24] WindowMaker: XShape and XRandr variables in WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From c031c2fcfbeadce7c8da0dbd13b251cfa65bb825 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:51:28 +0100
Subject: [PATCH 14/24] WindowMaker: XShape and XRandr variables in WindowMaker.h

The variables for XShape and XRandr now are in WindowMaker.h and the externs 
are not needed.
---
 src/WindowMaker.h |   10 ++
 src/client.c  |6 --
 src/event.c   |   14 --
 src/main.c|   10 --
 src/screen.c  |5 -
 src/startup.c |   10 --
 src/switchpanel.c |2 --
 src/window.c  |4 
 8 files changed, 10 insertions(+), 51 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index d74240f..15e9216 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -474,4 +474,14 @@ XContext wAppWinContext;
 XContext wStackContext;
 XContext wVEdgeContext;
 
+#ifdef SHAPE
+Bool wShapeSupported;
+int wShapeEventBase;
+#endif
+
+#ifdef HAVE_XRANDR
+Bool has_randr;
+int randr_event_base;
+#endif
+
 #endif
diff --git a/src/client.c b/src/client.c
index 3d9fabb..a0c4ced 100644
--- a/src/client.c
+++ b/src/client.c
@@ -44,12 +44,6 @@
 #include wmspec.h
 #include main.h
 
-/** Global Variables **/
-
-#ifdef SHAPE
-extern Bool wShapeSupported;
-#endif
-
 /*
  *
  * wClientRestore--
diff --git a/src/event.c b/src/event.c
index 2ec63a6..2eb9bbb 100644
--- a/src/event.c
+++ b/src/event.c
@@ -76,21 +76,7 @@ extern Time LastFocusChange;
 
 #define MOD_MASK wPreferences.modifier_mask
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-extern int wShapeEventBase;
-#endif
-
-#ifdef HAVE_XRANDR
-extern Bool has_randr;
-extern int randr_event_base;
-#endif
-
-/* special flags */
-/*extern char WDelayedActionSet;*/
-
 / Local stuff ***/
-
 static void saveTimestamp(XEvent *event);
 static void handleColormapNotify(XEvent *event);
 static void handleMapNotify(XEvent *event);
diff --git a/src/main.c b/src/main.c
index b223a0e..fa72056 100644
--- a/src/main.c
+++ b/src/main.c
@@ -89,16 +89,6 @@ Time LastTimestamp = CurrentTime;
 /* timestamp on the last time we did XSetInputFocus() */
 Time LastFocusChange = CurrentTime;
 
-#ifdef SHAPE
-Bool wShapeSupported;
-int wShapeEventBase;
-#endif
-
-#ifdef HAVE_XRANDR
-Bool has_randr;
-int randr_event_base;
-#endif
-
 /* special flags */
 char WDelayedActionSet = 0;
 / End Global Variables */
diff --git a/src/screen.c b/src/screen.c
index 4bad564..5cca7bb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -70,11 +70,6 @@
 
 / Global variables /
 extern int wScreenCount;
-
-#ifdef HAVE_XRANDR
-extern int has_randr;
-#endif
-
 extern WDDomain *WDWindowMaker;
 
 / Local /
diff --git a/src/startup.c b/src/startup.c
index 5640e92..26ccc8f 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -89,16 +89,6 @@ extern WDDomain *WDWindowAttributes;
 extern WShortKey wKeyBindings[WKBD_LAST];
 extern int wScreenCount;
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-extern int wShapeEventBase;
-#endif
-
-#ifdef HAVE_XRANDR
-extern Bool has_randr;
-extern int randr_event_base;
-#endif
-
 #ifndef HAVE_INOTIFY
 /* special flags */
 extern char WDelayedActionSet;
diff --git a/src/switchpanel.c b/src/switchpanel.c
index 94aee03..daf3c90 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -36,8 +36,6 @@
 
 #ifdef SHAPE
 #include X11/extensions/shape.h
-
-extern Bool wShapeSupported;
 #endif
 
 struct SwitchPanel {
diff --git a/src/window.c b/src/window.c
index 836a1ad..52f2dc5 100644
--- a/src/window.c
+++ b/src/window.c
@@ -69,10 +69,6 @@
 /** Global Variables **/
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-#ifdef SHAPE
-extern Bool wShapeSupported;
-#endif
-
 /* protocol atoms */
 extern Time LastTimestamp;
 
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From c031c2fcfbeadce7c8da0dbd13b251cfa65bb825 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:51:28 +0100
Subject: [PATCH 14/24] WindowMaker: XShape and XRandr variables in WindowMaker.h

The variables for XShape and XRandr now are in WindowMaker.h and the externs are not needed.
---
 src/WindowMaker.h |   10 ++
 src/client.c  |6 --
 src/event.c   |   14 --
 src/main.c|   10 --
 src/screen.c  |5 -
 src/startup.c |   10 --
 src/switchpanel.c |2 --
 src/window.c  |4 
 8 files changed, 10 insertions(+), 51 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index d74240f..15e9216 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -474,4 +474,14 @@ XContext wAppWinContext;
 XContext wStackContext;
 XContext wVEdgeContext;
 
+#ifdef SHAPE
+Bool wShapeSupported;
+int wShapeEventBase;
+#endif
+
+#ifdef HAVE_XRANDR
+Bool has_randr;
+int randr_event_base;
+#endif
+
 #endif
diff --git a/src/client.c b/src/client.c
index 

[PATCH 15/24] WindowMaker: Time variables are moved to WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From 9eba0db0a7a832cd6dc69ba459bb730c806e0540 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:59:40 +0100
Subject: [PATCH 15/24] WindowMaker: Time variables are moved to WindowMaker.h

The Time variables LastTimestamp  LastFocusChange are moved to WindowMaker.h 
and now the externs are not needed.
---
 src/WindowMaker.h |3 +++
 src/actions.c |3 ---
 src/appmenu.c |3 ---
 src/event.c   |2 --
 src/main.c|9 -
 src/session.c |4 
 src/shutdown.c|1 -
 src/window.c  |3 ---
 src/winmenu.c |2 --
 src/wmspec.c  |3 ---
 10 files changed, 7 insertions(+), 26 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 15e9216..69539b6 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -484,4 +484,7 @@ Bool has_randr;
 int randr_event_base;
 #endif
 
+Time LastTimestamp;
+Time LastFocusChange;
+
 #endif
diff --git a/src/actions.c b/src/actions.c
index 133879d..8b654ab 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -48,10 +48,7 @@
 #include main.h
 
 /** Global Variables **/
-
 int ignore_wks_change = 0;
-extern Time LastTimestamp;
-extern Time LastFocusChange;
 extern void ProcessPendingEvents();
 extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
 
diff --git a/src/appmenu.c b/src/appmenu.c
index 2bbaafe..5d7bf52 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -38,9 +38,6 @@
 #include framewin.h
 #include main.h
 
-/ Global Variables **/
-extern Time LastTimestamp;
-
 typedef struct {
short code;
short tag;
diff --git a/src/event.c b/src/event.c
index 2eb9bbb..9cdcb83 100644
--- a/src/event.c
+++ b/src/event.c
@@ -71,8 +71,6 @@
 / Global Variables **/
 extern WShortKey wKeyBindings[WKBD_LAST];
 extern int wScreenCount;
-extern Time LastTimestamp;
-extern Time LastFocusChange;
 
 #define MOD_MASK wPreferences.modifier_mask
 
diff --git a/src/main.c b/src/main.c
index fa72056..0969f62 100644
--- a/src/main.c
+++ b/src/main.c
@@ -84,11 +84,6 @@ WDDomain *WDWindowMaker = NULL;
 WDDomain *WDWindowAttributes = NULL;
 WDDomain *WDRootMenu = NULL;
 
-/* last event timestamp for XSetInputFocus */
-Time LastTimestamp = CurrentTime;
-/* timestamp on the last time we did XSetInputFocus() */
-Time LastFocusChange = CurrentTime;
-
 /* special flags */
 char WDelayedActionSet = 0;
 / End Global Variables */
@@ -487,6 +482,10 @@ int main(int argc, char **argv)
 
WMNResetStacking = WMNResetStacking;
 
+   /* last event timestamp for XSetInputFocus */
+   LastTimestamp = CurrentTime;
+   /* timestamp on the last time we did XSetInputFocus() */
+   LastFocusChange = CurrentTime;
 
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
diff --git a/src/session.c b/src/session.c
index a4604bc..f4af01b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -85,10 +85,6 @@
 
 #include WINGs/WUtil.h
 
-/** Global **/
-
-extern Time LastTimestamp;
-
 static WMPropList *sApplications = NULL;
 static WMPropList *sCommand;
 static WMPropList *sName;
diff --git a/src/shutdown.c b/src/shutdown.c
index f7041a5..ab937ba 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -37,7 +37,6 @@
 #include wmspec.h
 #include main.h
 
-extern Time LastTimestamp;
 extern int wScreenCount;
 
 static void wipeDesktop(WScreen * scr);
diff --git a/src/window.c b/src/window.c
index 52f2dc5..95e82ea 100644
--- a/src/window.c
+++ b/src/window.c
@@ -69,9 +69,6 @@
 /** Global Variables **/
 extern WShortKey wKeyBindings[WKBD_LAST];
 
-/* protocol atoms */
-extern Time LastTimestamp;
-
 /* superfluous... */
 extern void DoWindowBirth(WWindow *wwin);
 
diff --git a/src/winmenu.c b/src/winmenu.c
index d278dbf..835c824 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -66,8 +66,6 @@
 #define WO_ENTRIES 3
 
 / Global data ***/
-extern Time LastTimestamp;
-
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 static void updateOptionsMenu(WMenu * menu, WWindow * wwin);
diff --git a/src/wmspec.c b/src/wmspec.c
index 7623354..e090a48 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -51,9 +51,6 @@
 #include properties.h
 #include main.h
 
-/* Global variables */
-extern Time LastTimestamp;
-
 /* Root Window Properties */
 static Atom net_supported;
 static Atom net_client_list;
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 9eba0db0a7a832cd6dc69ba459bb730c806e0540 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 06:59:40 +0100
Subject: [PATCH 15/24] WindowMaker: Time variables are moved to WindowMaker.h

The Time variables LastTimestamp  LastFocusChange are moved to WindowMaker.h and now the externs are not needed.
---
 src/WindowMaker.h |3 +++
 src/actions.c |3 ---
 src/appmenu.c |3 ---
 src/event.c   |2 --
 src/main.c  

[PATCH 16/24] WindowMaker: WDDomain struct and variables defined in WindowMaker.h

2012-01-26 Thread Rodolfo kix Garcia

From a4ba6ae7010944be9095a2c13c45ddfa50cc7a83 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:08:16 +0100
Subject: [PATCH 16/24] WindowMaker: WDDomain struct and variables defined in 
WindowMaker.h

The struct WDDomain and the variables WDWindowMaker, WDWindowAttributes, 
WDRootMenu are defined in WindowMaker.h. Now the externs are not needed.
---
 src/WindowMaker.h |   13 +
 src/application.c |5 -
 src/defaults.c|3 ---
 src/defaults.h|   21 -
 src/dialog.c  |2 --
 src/main.c|   10 +-
 src/rootmenu.c|1 -
 src/screen.c  |1 -
 src/startup.c |3 ---
 src/wdefaults.c   |1 -
 src/winspector.c  |2 --
 11 files changed, 18 insertions(+), 44 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 69539b6..4003aba 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -304,6 +304,14 @@ typedef struct WCoord {
 int x, y;
 } WCoord;
 
+typedef struct WDDomain {
+   char *domain_name;
+   WMPropList *dictionary;
+   char *path;
+   time_t timestamp;
+} WDDomain;
+
+
 typedef struct WPreferences {
 char *pixmap_path;/* : separated list of paths to find 
pixmaps */
 char *icon_path;  /* : separated list of paths to find 
icons */
@@ -487,4 +495,9 @@ int randr_event_base;
 Time LastTimestamp;
 Time LastFocusChange;
 
+/* defaults domains */
+WDDomain *WDWindowMaker;
+WDDomain *WDWindowAttributes;
+WDDomain *WDRootMenu;
+
 #endif
diff --git a/src/application.c b/src/application.c
index 863fed7..538f145 100644
--- a/src/application.c
+++ b/src/application.c
@@ -50,11 +50,6 @@
 
 #include xinerama.h
 
-/ Global variables /
-extern WDDomain *WDWindowAttributes;
-
-/ Local variables /
-
 static WWindow *makeMainWindow(WScreen * scr, Window window)
 {
WWindow *wwin;
diff --git a/src/defaults.c b/src/defaults.c
index 2608818..3e421b4 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -69,9 +69,6 @@
 #endif
 
 /* Global */
-extern WDDomain *WDWindowMaker;
-extern WDDomain *WDWindowAttributes;
-extern WDDomain *WDRootMenu;
 extern int wScreenCount;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
diff --git a/src/defaults.h b/src/defaults.h
index 2dcf339..9383fe1 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -21,34 +21,15 @@
 #ifndef WMDEFAULTS_H_
 #define WMDEFAULTS_H_
 
-typedef struct WDDomain {
-char *domain_name;
-WMPropList *dictionary;
-char *path;
-time_t timestamp;
-} WDDomain;
-
-#if 0
-WMPropList* wDefaultsInit(int screen_number);
-#endif
-
-
 WDDomain* wDefaultsInitDomain(char *domain, Bool requireDictionary);
 
 void wDefaultsMergeGlobalMenus(WDDomain *menuDomain);
-
 void wDefaultsDestroyDomain(WDDomain *domain);
-
 void wReadDefaults(WScreen *scr, WMPropList *new_dict);
-
 void wDefaultUpdateIcons(WScreen *scr);
-
 void wReadStaticDefaults(WMPropList *dict);
-
 void wDefaultsCheckDomains(void *arg);
-
 void wSaveDefaults(WScreen *scr);
-
 char *wDefaultGetIconFile(WScreen *scr, char *instance, char *class,
   Bool noDefault);
 
@@ -59,8 +40,6 @@ void wDefaultFillAttributes(WScreen *scr, char *instance, 
char *class,
 Bool useGlobalDefault);
 
 int wDefaultGetStartWorkspace(WScreen *scr, char *instance, char *class);
-
 void wDefaultChangeIcon(WScreen *scr, char *instance, char* class, char *file);
 
 #endif /* WMDEFAULTS_H_ */
-
diff --git a/src/dialog.c b/src/dialog.c
index 286e059..03d59e9 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1430,8 +1430,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 0969f62..d9ce2a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,11 +79,6 @@ WMPropList *wAttributeDomainName;
 
 WShortKey wKeyBindings[WKBD_LAST];
 
-/* defaults domains */
-WDDomain *WDWindowMaker = NULL;
-WDDomain *WDWindowAttributes = NULL;
-WDDomain *WDRootMenu = NULL;
-
 /* special flags */
 char WDelayedActionSet = 0;
 / End Global Variables */
@@ -487,6 +482,11 @@ int main(int argc, char **argv)
/* timestamp on the last time we did XSetInputFocus() */
LastFocusChange = CurrentTime;
 
+   /* defaults domains */
+   WDWindowMaker = NULL;
+   WDWindowAttributes = NULL;
+   WDRootMenu = NULL;
+
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
 
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 0c3f13e..c592cbd 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -56,7 +56,6 @@
 #define MAX_SHORTCUT_LENGTH 32
 
 extern char *Locale;
-extern WDDomain *WDRootMenu;
 
 static WMenu *readMenuPipe(WScreen * scr, char 

[PATCH 17/24] WindowMaker: wDefaultsCheckDomains included in defaults.h

2012-01-26 Thread Rodolfo kix Garcia

From 6f13c810cff51e8eddc6bd3ff83d6dd42881ce8e Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:16:42 +0100
Subject: [PATCH 17/24] WindowMaker: wDefaultsCheckDomains included in defaults.h

The function wDefaultsCheckDomains is included in defaults.h, and this file is 
included as header in event.c, therefore the extern is not needed.
---
 src/event.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/event.c b/src/event.c
index 9cdcb83..f034764 100644
--- a/src/event.c
+++ b/src/event.c
@@ -290,7 +290,6 @@ void DispatchEvent(XEvent * event)
 #define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
 void inotifyHandleEvents(int fd, int wd)
 {
-   extern void wDefaultsCheckDomains(void *);
ssize_t eventQLength, i = 0;
char buff[BUFF_SIZE] = { 0 };
/* Check config only once per read of the event queue */
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 6f13c810cff51e8eddc6bd3ff83d6dd42881ce8e Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:16:42 +0100
Subject: [PATCH 17/24] WindowMaker: wDefaultsCheckDomains included in defaults.h

The function wDefaultsCheckDomains is included in defaults.h, and this file is included as header in event.c, therefore the extern is not needed.
---
 src/event.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/event.c b/src/event.c
index 9cdcb83..f034764 100644
--- a/src/event.c
+++ b/src/event.c
@@ -290,7 +290,6 @@ void DispatchEvent(XEvent * event)
 #define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
 void inotifyHandleEvents(int fd, int wd)
 {
-	extern void wDefaultsCheckDomains(void *);
 	ssize_t eventQLength, i = 0;
 	char buff[BUFF_SIZE] = { 0 };
 	/* Check config only once per read of the event queue */
-- 
1.7.2.3



[PATCH 18/24] WindowMaker: inotify variables, Locale and wScreenCount moved to WindowMaker.c

2012-01-26 Thread Rodolfo kix Garcia

From 87bc02e7c99e5323798cef434f164b6ede07465e Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:27:51 +0100
Subject: [PATCH 18/24] WindowMaker: inotify variables, Locale and wScreenCount 
moved to WindowMaker.c

These variables are moved to WindowMaker.c and now don't need extern.
---
 src/WindowMaker.h |   10 ++
 src/defaults.c|1 -
 src/event.c   |3 ---
 src/main.c|   16 
 src/rootmenu.c|2 --
 src/screen.c  |3 ---
 src/shutdown.c|5 -
 src/startup.c |1 -
 8 files changed, 14 insertions(+), 27 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 4003aba..42143fa 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -500,4 +500,14 @@ WDDomain *WDWindowMaker;
 WDDomain *WDWindowAttributes;
 WDDomain *WDRootMenu;
 
+#ifdef HAVE_INOTIFY
+int inotifyFD;
+int inotifyWD;
+#endif
+
+/* locale to use. NULL==POSIX or C */
+char *Locale;
+
+int wScreenCount;
+
 #endif
diff --git a/src/defaults.c b/src/defaults.c
index 3e421b4..8b2ffd4 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -69,7 +69,6 @@
 #endif
 
 /* Global */
-extern int wScreenCount;
 extern WShortKey wKeyBindings[WKBD_LAST];
 
 typedef struct {
diff --git a/src/event.c b/src/event.c
index f034764..196dbea 100644
--- a/src/event.c
+++ b/src/event.c
@@ -70,7 +70,6 @@
 
 / Global Variables **/
 extern WShortKey wKeyBindings[WKBD_LAST];
-extern int wScreenCount;
 
 #define MOD_MASK wPreferences.modifier_mask
 
@@ -351,8 +350,6 @@ void EventLoop(void)
 {
XEvent event;
 #ifdef HAVE_INOTIFY
-   extern int inotifyFD;
-   extern int inotifyWD;
struct timeval time;
fd_set rfds;
int retVal = 0;
diff --git a/src/main.c b/src/main.c
index d9ce2a3..ee91ee3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,21 +59,9 @@
 #define GLOBAL_DEFAULTS_SUBDIR WindowMaker
 #endif
 
-/** Global Variables **/
-
 /* general info */
-
 char *ProgName;
 
-#ifdef HAVE_INOTIFY
-int inotifyFD;
-int inotifyWD;
-#endif
-/* locale to use. NULL==POSIX or C */
-char *Locale = NULL;
-
-int wScreenCount = 0;
-
 WMPropList *wDomainName;
 WMPropList *wAttributeDomainName;
 
@@ -487,6 +475,10 @@ int main(int argc, char **argv)
WDWindowAttributes = NULL;
WDRootMenu = NULL;
 
+   /* locale to use. NULL==POSIX or C */
+   Locale = NULL;
+   wScreenCount = 0;
+
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
 
diff --git a/src/rootmenu.c b/src/rootmenu.c
index c592cbd..2d2ba58 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -55,8 +55,6 @@
 
 #define MAX_SHORTCUT_LENGTH 32
 
-extern char *Locale;
-
 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);
diff --git a/src/screen.c b/src/screen.c
index 16e600e..7a1f42b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -68,9 +68,6 @@
 |SubstructureRedirectMask|ButtonPressMask|ButtonReleaseMask\
 |KeyPressMask|KeyReleaseMask)
 
-/ Global variables /
-extern int wScreenCount;
-
 / Local /
 #define STIPPLE_WIDTH 2
 #define STIPPLE_HEIGHT 2
diff --git a/src/shutdown.c b/src/shutdown.c
index ab937ba..165d125 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -37,8 +37,6 @@
 #include wmspec.h
 #include main.h
 
-extern int wScreenCount;
-
 static void wipeDesktop(WScreen * scr);
 
 /*
@@ -54,9 +52,6 @@ static void wipeDesktop(WScreen * scr);
 void Shutdown(WShutdownMode mode)
 {
int i;
-#ifdef HAVE_INOTIFY
-   extern int inotifyFD;
-#endif
 
switch (mode) {
case WSLogoutMode:
diff --git a/src/startup.c b/src/startup.c
index 032ab53..e7bda9b 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -84,7 +84,6 @@
 
 /** Global Variables **/
 extern WShortKey wKeyBindings[WKBD_LAST];
-extern int wScreenCount;
 
 #ifndef HAVE_INOTIFY
 /* special flags */
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 19/24] WindowMaker: removed WMPropList because are not used

2012-01-26 Thread Rodolfo kix Garcia

From 34cf8d662fb3f3ff16205c3b0baaa7d171ae1f0a Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:32:15 +0100
Subject: [PATCH 19/24] WindowMaker: removed WMPropList because are not used

The variables WMPropList are not used, then can be removed.
---
 src/main.c  |3 ---
 src/wdefaults.c |9 -
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/main.c b/src/main.c
index ee91ee3..3f0d8df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,9 +62,6 @@
 /* general info */
 char *ProgName;
 
-WMPropList *wDomainName;
-WMPropList *wAttributeDomainName;
-
 WShortKey wKeyBindings[WKBD_LAST];
 
 /* special flags */
diff --git a/src/wdefaults.c b/src/wdefaults.c
index b72ddc4..ff6035c 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -42,11 +42,6 @@
 #include defaults.h
 #include icon.h
 
-/* Global stuff */
-extern WMPropList *wAttributeDomainName;
-
-/* Local stuff */
-
 /* type converters */
 static int getBool(WMPropList *, WMPropList *);
 static char *getString(WMPropList *, WMPropList *);
@@ -122,10 +117,6 @@ static void init_wdefaults(WScreen * scr)
 
AnyWindow = WMCreatePLString(*);
No = WMCreatePLString(No);
-   /*
-  if (!scr-wattribs) {
-  scr-wattribs = PLGetDomain(wAttributeDomainName);
-  } */
 }
 
 static WMPropList *get_value(WMPropList * dict_win, WMPropList * dict_class, 
WMPropList * dict_name,
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 34cf8d662fb3f3ff16205c3b0baaa7d171ae1f0a Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:32:15 +0100
Subject: [PATCH 19/24] WindowMaker: removed WMPropList because are not used

The variables WMPropList are not used, then can be removed.
---
 src/main.c  |3 ---
 src/wdefaults.c |9 -
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/main.c b/src/main.c
index ee91ee3..3f0d8df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,9 +62,6 @@
 /* general info */
 char *ProgName;
 
-WMPropList *wDomainName;
-WMPropList *wAttributeDomainName;
-
 WShortKey wKeyBindings[WKBD_LAST];
 
 /* special flags */
diff --git a/src/wdefaults.c b/src/wdefaults.c
index b72ddc4..ff6035c 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -42,11 +42,6 @@
 #include defaults.h
 #include icon.h
 
-/* Global stuff */
-extern WMPropList *wAttributeDomainName;
-
-/* Local stuff */
-
 /* type converters */
 static int getBool(WMPropList *, WMPropList *);
 static char *getString(WMPropList *, WMPropList *);
@@ -122,10 +117,6 @@ static void init_wdefaults(WScreen * scr)
 
 	AnyWindow = WMCreatePLString(*);
 	No = WMCreatePLString(No);
-	/*
-	   if (!scr-wattribs) {
-	   scr-wattribs = PLGetDomain(wAttributeDomainName);
-	   } */
 }
 
 static WMPropList *get_value(WMPropList * dict_win, WMPropList * dict_class, WMPropList * dict_name,
-- 
1.7.2.3



[PATCH 20/24] WindowMaker: wKeyBindings is defined now at keybind.h

2012-01-26 Thread Rodolfo kix Garcia

From f0c0caeebe2968128089a781331f97e32586f5dc Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:40:28 +0100
Subject: [PATCH 20/24] WindowMaker: wKeyBindings is defined now at keybind.h

The externs for wKeyBindings are now not needed, because the header file is 
included in the other files.
---
 src/cycling.c  |2 --
 src/defaults.c |3 ---
 src/event.c|3 ---
 src/keybind.h  |2 ++
 src/main.c |2 --
 src/startup.c  |3 ---
 src/window.c   |3 ---
 src/winmenu.c  |3 ---
 8 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/src/cycling.c b/src/cycling.c
index 3b21884..f7d3e25 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -39,8 +39,6 @@
 #include switchpanel.h
 
 /* Globals */
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin)
 {
Window swwin = wSwitchPanelGetWindow(swpanel);
diff --git a/src/defaults.c b/src/defaults.c
index 8b2ffd4..e01be2f 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -68,9 +68,6 @@
 #define GLOBAL_DEFAULTS_SUBDIR WindowMaker
 #endif
 
-/* Global */
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 typedef struct {
char *key;
char *default_value;
diff --git a/src/event.c b/src/event.c
index 196dbea..6cfd627 100644
--- a/src/event.c
+++ b/src/event.c
@@ -68,9 +68,6 @@
 #include wmspec.h
 #include main.h
 
-/ Global Variables **/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 #define MOD_MASK wPreferences.modifier_mask
 
 / Local stuff ***/
diff --git a/src/keybind.h b/src/keybind.h
index e8b503c..b0f81ae 100644
--- a/src/keybind.h
+++ b/src/keybind.h
@@ -101,6 +101,8 @@ typedef struct WShortKey {
 KeyCode keycode;
 } WShortKey;
 
+WShortKey wKeyBindings[WKBD_LAST];
+
 void wKeyboardInitialize();
 
 #endif /* WMKEYBIND_H */
diff --git a/src/main.c b/src/main.c
index 3f0d8df..d0d662a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,8 +62,6 @@
 /* general info */
 char *ProgName;
 
-WShortKey wKeyBindings[WKBD_LAST];
-
 /* special flags */
 char WDelayedActionSet = 0;
 / End Global Variables */
diff --git a/src/startup.c b/src/startup.c
index e7bda9b..0727b8e 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -82,9 +82,6 @@
 # define SA_NODEFER 0
 #endif
 
-/** Global Variables **/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 #ifndef HAVE_INOTIFY
 /* special flags */
 extern char WDelayedActionSet;
diff --git a/src/window.c b/src/window.c
index 95e82ea..e6385cc 100644
--- a/src/window.c
+++ b/src/window.c
@@ -66,9 +66,6 @@
 
 #define MOD_MASK wPreferences.modifier_mask
 
-/** Global Variables **/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 /* superfluous... */
 extern void DoWindowBirth(WWindow *wwin);
 
diff --git a/src/winmenu.c b/src/winmenu.c
index 835c824..1e74225 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -65,9 +65,6 @@
 #define WO_OMNIPRESENT 2
 #define WO_ENTRIES 3
 
-/ Global data ***/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 static void updateOptionsMenu(WMenu * menu, WWindow * wwin);
 
 static void execWindowOptionCommand(WMenu * menu, WMenuEntry * entry)
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From f0c0caeebe2968128089a781331f97e32586f5dc Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:40:28 +0100
Subject: [PATCH 20/24] WindowMaker: wKeyBindings is defined now at keybind.h

The externs for wKeyBindings are now not needed, because the header file is included in the other files.
---
 src/cycling.c  |2 --
 src/defaults.c |3 ---
 src/event.c|3 ---
 src/keybind.h  |2 ++
 src/main.c |2 --
 src/startup.c  |3 ---
 src/window.c   |3 ---
 src/winmenu.c  |3 ---
 8 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/src/cycling.c b/src/cycling.c
index 3b21884..f7d3e25 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -39,8 +39,6 @@
 #include switchpanel.h
 
 /* Globals */
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin)
 {
 	Window swwin = wSwitchPanelGetWindow(swpanel);
diff --git a/src/defaults.c b/src/defaults.c
index 8b2ffd4..e01be2f 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -68,9 +68,6 @@
 #define GLOBAL_DEFAULTS_SUBDIR WindowMaker
 #endif
 
-/* Global */
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 typedef struct {
 	char *key;
 	char *default_value;
diff --git a/src/event.c b/src/event.c
index 196dbea..6cfd627 100644
--- a/src/event.c
+++ b/src/event.c
@@ -68,9 +68,6 @@
 #include wmspec.h
 #include main.h
 
-/ Global Variables **/
-extern WShortKey wKeyBindings[WKBD_LAST];
-
 #define MOD_MASK wPreferences.modifier_mask
 
 / Local stuff ***/
diff --git a/src/keybind.h b/src/keybind.h
index e8b503c..b0f81ae 100644
--- a/src/keybind.h
+++ 

[PATCH 21/24] WindowMaker: ProcessPendingEvents moved to event.h

2012-01-26 Thread Rodolfo kix Garcia

From cadfccd075a8224e03c98dfa9c9c729431258d5f Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:46:49 +0100
Subject: [PATCH 21/24] WindowMaker: ProcessPendingEvents moved to event.h

The function ProcessPendingEvents is moved to the new file event.h. Now the 
function don't need to be extern.
---
 src/Makefile.am |1 +
 src/actions.c   |2 +-
 src/event.c |1 +
 src/event.h |1 +
 src/workspace.c |2 +-
 5 files changed, 5 insertions(+), 2 deletions(-)
 create mode 100644 src/event.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 6d2729c..818987b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ wmaker_SOURCES =  \
dockedapp.c \
dock.h \
event.c \
+   event.h \
extend_pixmaps.h \
framewin.c \
framewin.h \
diff --git a/src/actions.c b/src/actions.c
index 8b654ab..fb88903 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -46,10 +46,10 @@
 #include workspace.h
 #include xinerama.h
 #include main.h
+#include event.h
 
 /** Global Variables **/
 int ignore_wks_change = 0;
-extern void ProcessPendingEvents();
 extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
 
 static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, 
int *new_y,
diff --git a/src/event.c b/src/event.c
index 6cfd627..639167f 100644
--- a/src/event.c
+++ b/src/event.c
@@ -67,6 +67,7 @@
 #include xinerama.h
 #include wmspec.h
 #include main.h
+#include event.h
 
 #define MOD_MASK wPreferences.modifier_mask
 
diff --git a/src/event.h b/src/event.h
new file mode 100644
index 000..8b82223
--- /dev/null
+++ b/src/event.h
@@ -0,0 +1 @@
+void ProcessPendingEvents(void);
diff --git a/src/workspace.c b/src/workspace.c
index 53c61c7..a0606c1 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -48,12 +48,12 @@
 #include appicon.h
 #include wmspec.h
 #include xinerama.h
+#include event.h
 
 #define MAX_SHORTCUT_LENGTH 32
 #define WORKSPACE_NAME_DISPLAY_PADDING 32
 
 extern int ignore_wks_change;
-extern void ProcessPendingEvents();
 
 static WMPropList *dWorkspaces = NULL;
 static WMPropList *dClip, *dName;
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From cadfccd075a8224e03c98dfa9c9c729431258d5f Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 07:46:49 +0100
Subject: [PATCH 21/24] WindowMaker: ProcessPendingEvents moved to event.h

The function ProcessPendingEvents is moved to the new file event.h. Now the function don't need to be extern.
---
 src/Makefile.am |1 +
 src/actions.c   |2 +-
 src/event.c |1 +
 src/event.h |1 +
 src/workspace.c |2 +-
 5 files changed, 5 insertions(+), 2 deletions(-)
 create mode 100644 src/event.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 6d2729c..818987b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ wmaker_SOURCES = 	\
 	dockedapp.c \
 	dock.h \
 	event.c \
+	event.h \
 	extend_pixmaps.h \
 	framewin.c \
 	framewin.h \
diff --git a/src/actions.c b/src/actions.c
index 8b654ab..fb88903 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -46,10 +46,10 @@
 #include workspace.h
 #include xinerama.h
 #include main.h
+#include event.h
 
 /** Global Variables **/
 int ignore_wks_change = 0;
-extern void ProcessPendingEvents();
 extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
 
 static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
diff --git a/src/event.c b/src/event.c
index 6cfd627..639167f 100644
--- a/src/event.c
+++ b/src/event.c
@@ -67,6 +67,7 @@
 #include xinerama.h
 #include wmspec.h
 #include main.h
+#include event.h
 
 #define MOD_MASK wPreferences.modifier_mask
 
diff --git a/src/event.h b/src/event.h
new file mode 100644
index 000..8b82223
--- /dev/null
+++ b/src/event.h
@@ -0,0 +1 @@
+void ProcessPendingEvents(void);
diff --git a/src/workspace.c b/src/workspace.c
index 53c61c7..a0606c1 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -48,12 +48,12 @@
 #include appicon.h
 #include wmspec.h
 #include xinerama.h
+#include event.h
 
 #define MAX_SHORTCUT_LENGTH 32
 #define WORKSPACE_NAME_DISPLAY_PADDING 32
 
 extern int ignore_wks_change;
-extern void ProcessPendingEvents();
 
 static WMPropList *dWorkspaces = NULL;
 static WMPropList *dClip, *dName;
-- 
1.7.2.3



[PATCH 22/24] WindowMaker: Multiple externs removed.

2012-01-26 Thread Rodolfo kix Garcia

From c86b5e99c8ae1e7db74b7c722d5e236d05d38b4d Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 08:02:25 +0100
Subject: [PATCH 22/24] WindowMaker: Multiple externs removed.

Multiple externs has been removed from the files, creating new files monitor.h, 
startup.h and dockedapp.h to put the shared definitions inside.
---
 src/Makefile.am |3 +++
 src/dock.c  |7 +--
 src/dockedapp.c |1 +
 src/dockedapp.h |3 +++
 src/event.c |3 ---
 src/event.h |2 ++
 src/main.c  |5 +
 src/monitor.c   |1 +
 src/monitor.h   |1 +
 src/startup.c   |4 ++--
 src/startup.h   |1 +
 11 files changed, 16 insertions(+), 15 deletions(-)
 create mode 100644 src/dockedapp.h
 create mode 100644 src/monitor.h
 create mode 100644 src/startup.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 818987b..14c1eb9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,6 +30,7 @@ wmaker_SOURCES =  \
dialog.h \
dock.c \
dockedapp.c \
+   dockedapp.h \
dock.h \
event.c \
event.h \
@@ -49,6 +50,7 @@ wmaker_SOURCES =  \
misc.c \
osdep_@WM_OSDEP@.c \
monitor.c \
+   monitor.h \
motif.c \
motif.h \
moveres.c \
@@ -71,6 +73,7 @@ wmaker_SOURCES =  \
stacking.c \
stacking.h \
startup.c \
+   startup.h \
superfluous.c \
superfluous.h \
switchmenu.c \
diff --git a/src/dock.c b/src/dock.c
index df2892b..85bdf47 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -53,6 +53,7 @@
 #include framewin.h
 #include superfluous.h
 #include xinerama.h
+#include dockedapp.h
 
 / Local variables /
 #define CLIP_REWIND   1
@@ -60,12 +61,6 @@
 #define CLIP_FORWARD  2
 
 / Global variables /
-
-/* in dockedapp.c */
-extern void DestroyDockAppSettingsPanel();
-extern void ShowDockAppSettingsPanel(WAppIcon * aicon);
-extern void appIconMouseDown(WObjDescriptor *desc, XEvent *event);
-
 #define MOD_MASK wPreferences.modifier_mask
 #define ICON_SIZE wPreferences.icon_size
 
diff --git a/src/dockedapp.c b/src/dockedapp.c
index d0693f2..132f14b 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -36,6 +36,7 @@
 #include defaults.h
 #include framewin.h
 #include xinerama.h
+#include dockedapp.h
 
 typedef struct _AppSettingsPanel {
WMWindow *win;
diff --git a/src/dockedapp.h b/src/dockedapp.h
new file mode 100644
index 000..4c461fb
--- /dev/null
+++ b/src/dockedapp.h
@@ -0,0 +1,3 @@
+void DestroyDockAppSettingsPanel();
+void ShowDockAppSettingsPanel(WAppIcon * aicon);
+void appIconMouseDown(WObjDescriptor *desc, XEvent *event);
diff --git a/src/event.c b/src/event.c
index 639167f..f996300 100644
--- a/src/event.c
+++ b/src/event.c
@@ -99,9 +99,6 @@ static void handleShapeNotify(XEvent *event);
 static void handleXkbIndicatorStateNotify(XEvent *event);
 #endif
 
-/* called from the signal handler */
-void NotifyDeadProcess(pid_t pid, unsigned char status);
-
 /* real dead process handler */
 static void handleDeadProcess(void *foo);
 
diff --git a/src/event.h b/src/event.h
index 8b82223..e910245 100644
--- a/src/event.h
+++ b/src/event.h
@@ -1 +1,3 @@
 void ProcessPendingEvents(void);
+void EventLoop(void);
+void NotifyDeadProcess(pid_t pid, unsigned char status);
diff --git a/src/main.c b/src/main.c
index d0d662a..77887cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,6 +52,7 @@
 #include xmodifier.h
 #include session.h
 #include dialog.h
+#include startup.h
 
 #include WINGs/WUtil.h
 
@@ -72,10 +73,6 @@ static char **Arguments;
 
 static int ArgCount;
 
-extern void EventLoop(void);
-extern void StartUp(Bool defaultScreenOnly);
-extern int MonitorLoop(int argc, char **argv);
-
 static Bool multiHead = True;
 
 static int *wVisualID = NULL;
diff --git a/src/monitor.c b/src/monitor.c
index d6c9505..7c8348d 100644
--- a/src/monitor.c
+++ b/src/monitor.c
@@ -38,6 +38,7 @@
 #include window.h
 #include dialog.h
 #include funcs.h
+#include monitor.h
 
 int showCrashDialog(int sig)
 {
diff --git a/src/monitor.h b/src/monitor.h
new file mode 100644
index 000..766121b
--- /dev/null
+++ b/src/monitor.h
@@ -0,0 +1 @@
+int MonitorLoop(int argc, char **argv);
diff --git a/src/startup.c b/src/startup.c
index 0727b8e..83ba9a5 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -71,6 +71,8 @@
 
 #include xutil.h
 #include main.h
+#include monitor.h
+#include event.h
 
 /* for SunOS */
 #ifndef SA_RESTART
@@ -87,8 +89,6 @@
 extern char WDelayedActionSet;
 #endif
 
-extern void NotifyDeadProcess(pid_t pid, unsigned char status);
-
 /* Local */
 static WScreen **wScreen = NULL;
 static unsigned int _NumLockMask = 0;
diff --git a/src/startup.h b/src/startup.h
new file mode 100644
index 000..3b67d0e
--- /dev/null
+++ b/src/startup.h
@@ -0,0 +1 @@
+void StartUp(Bool defaultScreenOnly);
-- 
1.7.2.3

-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/
From 

[PATCH 23/24] WindowMaker: More multiple externs removed.

2012-01-26 Thread Rodolfo kix Garcia

From a397dce191c54c41d113d0f80a6daaa897d4a86b Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Wed, 25 Jan 2012 08:24:45 +0100
Subject: [PATCH 23/24] WindowMaker: More multiple externs removed.

Multiple externs has been removed from the files, creating new files moveres.h, 
placement.h and dockedapp.h to put the shared definitions inside.
---
 src/Makefile.am   |2 ++
 src/actions.c |4 +---
 src/actions.h |2 ++
 src/main.c|9 +
 src/moveres.c |1 +
 src/moveres.h |1 +
 src/placement.c   |5 +
 src/placement.h   |1 +
 src/startup.c |5 -
 src/startup.h |1 +
 src/superfluous.c |   13 ++---
 src/superfluous.h |6 ++
 src/window.c  |4 +---
 src/workspace.c   |2 --
 14 files changed, 24 insertions(+), 32 deletions(-)
 create mode 100644 src/moveres.h
 create mode 100644 src/placement.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 14c1eb9..f660170 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,9 +54,11 @@ wmaker_SOURCES = \
motif.c \
motif.h \
moveres.c \
+   moveres.h \
pixmap.c \
pixmap.h \
placement.c \
+   placement.h \
properties.c \
properties.h \
resources.c \
diff --git a/src/actions.c b/src/actions.c
index fb88903..7640e26 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -47,11 +47,9 @@
 #include xinerama.h
 #include main.h
 #include event.h
+#include placement.h
 
 /** Global Variables **/
-int ignore_wks_change = 0;
-extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
-
 static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, 
int *new_y,
  unsigned int *new_width, unsigned int 
*new_height);
 static void save_old_geometry(WWindow *wwin);
diff --git a/src/actions.h b/src/actions.h
index da196ae..1001d18 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -31,6 +31,8 @@
 #define MAX_IGNORE_XINERAMA(1  5)
 #define MAX_KEYBOARD   (1  6)
 
+int ignore_wks_change;
+
 void wSetFocusTo(WScreen *scr, WWindow *wwin);
 
 int wMouseMoveWindow(WWindow *wwin, XEvent *ev);
diff --git a/src/main.c b/src/main.c
index 77887cc..0bf4320 100644
--- a/src/main.c
+++ b/src/main.c
@@ -53,6 +53,8 @@
 #include session.h
 #include dialog.h
 #include startup.h
+#include actions.h
+#include monitor.h
 
 #include WINGs/WUtil.h
 
@@ -63,10 +65,6 @@
 /* general info */
 char *ProgName;
 
-/* special flags */
-char WDelayedActionSet = 0;
-/ End Global Variables */
-
 static char *DisplayName = NULL;
 
 static char **Arguments;
@@ -471,6 +469,9 @@ int main(int argc, char **argv)
Locale = NULL;
wScreenCount = 0;
 
+   ignore_wks_change = 0;
+   WDelayedActionSet = 0;
+
/* setup common stuff for the monitor and wmaker itself */
WMInitializeApplication(WindowMaker, argc, argv);
 
diff --git a/src/moveres.c b/src/moveres.c
index f75165c..ceddbda 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -41,6 +41,7 @@
 #include geomview.h
 #include screen.h
 #include xinerama.h
+#include moveres.h
 
 #include WINGs/WINGsP.h
 
diff --git a/src/moveres.h b/src/moveres.h
new file mode 100644
index 000..9f647cd
--- /dev/null
+++ b/src/moveres.h
@@ -0,0 +1 @@
+void InteractivePlaceWindow(WWindow * wwin, int *x_ret, int *y_ret, unsigned 
width, unsigned height);
diff --git a/src/placement.c b/src/placement.c
index 24b1ba3..062be18 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -38,6 +38,7 @@
 #include application.h
 #include dock.h
 #include xinerama.h
+#include moveres.h
 
 #define X_ORIGIN WMAX(usableArea.x1,\
 wPreferences.window_place_origin.x)
@@ -45,10 +46,6 @@
 #define Y_ORIGIN WMAX(usableArea.y1,\
 wPreferences.window_place_origin.y)
 
-/* interactive window placement is in moveres.c */
-extern void InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
-  unsigned width, unsigned height);
-
 /* Returns True if it is an icon and is in this workspace */
 static Bool
 iconPosition(WCoreWindow *wcore, int sx1, int sy1, int sx2, int sy2,
diff --git a/src/placement.h b/src/placement.h
new file mode 100644
index 000..b383843
--- /dev/null
+++ b/src/placement.h
@@ -0,0 +1 @@
+int calcIntersectionLength(int p1, int l1, int p2, int l2);
diff --git a/src/startup.c b/src/startup.c
index 83ba9a5..af803da 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -84,11 +84,6 @@
 # define SA_NODEFER 0
 #endif
 
-#ifndef HAVE_INOTIFY
-/* special flags */
-extern char WDelayedActionSet;
-#endif
-
 /* Local */
 static WScreen **wScreen = NULL;
 static unsigned int _NumLockMask = 0;
diff --git a/src/startup.h b/src/startup.h
index 3b67d0e..9407c09 100644
--- a/src/startup.h
+++ b/src/startup.h
@@ -1 +1,2 @@
 void StartUp(Bool defaultScreenOnly);
+char WDelayedActionSet;
diff --git a/src/superfluous.c b/src/superfluous.c

Re: Patches

2012-01-26 Thread Rodolfo kix Garcia
On 27/01/12 00:21, Rodolfo kix Garcia wrote:

 Hi,
 
 I will sent a lot of patches (24) to remove the externs in the files and
 remove the duplicated #defines from the files. This patches creates some
 .h files to share the variables and remove some things that are not needed.
 
 Sorry for the amount of files.
 
 Best Regards,
 kix


Ah! one thing. I moved some stuff to WindowMaker.h. This is because
WindowMaker.h is included in the other files, then I don't need to
update the files to add a new header.

Cheers,
kix
-- 
||// //\\// Rodolfo kix Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Patches

2012-01-26 Thread Andreas Tscharner

On 27.01.2012 00:21, Rodolfo kix Garcia wrote:

[snip]

Sorry for the amount of files.


Don't worry! Yesterday on Linux Kernel mainlinglist:
[000/129] 3.2.2-stable review

Best regards
Andreas
--
  (`-''-/).___..--''`-._
   `o_ o  )   `-.  ( ).`-.__.`)
   (_Y_.)'  ._   )  `._ `. ``-..-'
 _..`--'_..-_/  /--'_.' .'
(il).-''  (li).'  ((!.-'

Andreas Tscharnera...@vis.ethz.ch
   http://www.vis.ethz.ch/~andy   ICQ-No. 14356454


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.