wmaker: Changed global constant declaration to use appropriate type
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 30 Jun 2013 14:02:39 +0000 (30 16:02 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 30 Jun 2013 14:13:41 +0000 (30 15:13 +0100)
The original type was not as safe as it looked like to be, and led
to more memory usage than necessary.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
src/WindowMaker.h
src/main.c

index 69923c1..21e6ff1 100644 (file)
@@ -455,18 +455,19 @@ extern char WProgramState;
 extern char WProgramSigState;
 
 /****** 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;
+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[];
+
 #endif
index 199033e..69a68e2 100644 (file)
@@ -150,20 +150,20 @@ char WProgramState = WSTATE_NORMAL;
 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";
+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 *****/