diff options
author | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
---|---|---|
committer | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
commit | 81cb173c5001f28ad178e9a9f59f521a13e66e92 (patch) | |
tree | 74bd7a59544bafd9e8aa024cb9c13ee5c4abe313 | |
parent | cf9a35db8381f9b809465306aec3bcfe3bc1dc0d (diff) |
Make FirstScreen a local variable
Signed-off-by: Tim Wiederhake <twied@gmx.net>
-rw-r--r-- | src/screen.h | 1 | ||||
-rw-r--r-- | src/twm.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/screen.h b/src/screen.h index 0cb307e..3a1cb52 100644 --- a/src/screen.h +++ b/src/screen.h @@ -254,7 +254,6 @@ typedef struct ScreenInfo { extern int NumScreens; extern ScreenInfo **ScreenList; extern ScreenInfo *Scr; -extern int FirstScreen; #define PPOS_OFF 0 #define PPOS_ON 1 @@ -109,7 +109,6 @@ int SyncEventBase, SyncErrorBase; ScreenInfo **ScreenList; /* structures for each screen */ ScreenInfo *Scr = NULL; /* the cur and prev screens */ int PreviousScreen; /* last screen that we were on */ -int FirstScreen; /* TRUE ==> first screen of display */ int message_level = 1; /* controls error messages */ static int RedirectError; /* TRUE ==> another window manager running */ static int TwmErrorHandler(Display *dpy, XErrorEvent *event); /* for setting RedirectError */ @@ -372,8 +371,9 @@ main(int argc, char *argv[]) } numManaged = 0; PreviousScreen = DefaultScreen(dpy); - FirstScreen = TRUE; for (scrnum = firstscrn; scrnum <= lastscrn; scrnum++) { + Bool FirstScreen = scrnum == firstscrn; + /* Make sure property priority colors is empty */ XChangeProperty(dpy, RootWindow(dpy, scrnum), _XA_MIT_PRIORITY_COLORS, XA_CARDINAL, 32, PropModeReplace, NULL, 0); @@ -634,7 +634,6 @@ main(int argc, char *argv[]) XUngrabServer(dpy); - FirstScreen = FALSE; Scr->FirstTime = FALSE; } /* for */ |