>From 9eba0db0a7a832cd6dc69ba459bb730c806e0540 Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) <[email protected]>
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) <[email protected]>
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