sowm: avoid global and remove uneeded initial value.

This commit is contained in:
Dylan Araps 2019-10-16 15:50:10 +03:00
parent 42e126009f
commit a5503f8159
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 5 deletions

10
sowm.c
View File

@ -54,7 +54,7 @@ static void ws_sel(int i);
static client *list = {0};
static desktop ws_list[10];
static int ws = 1, sh, sw, s;
static int ws, sh, sw;
static Display *d;
static Window root, cur;
@ -542,10 +542,10 @@ int main(void) {
signal(SIGCHLD, SIG_IGN);
XSetErrorHandler(xerror);
s = DefaultScreen(d);
root = RootWindow(d, s);
sw = XDisplayWidth(d, s);
sh = XDisplayHeight(d, s);
int s = DefaultScreen(d);
root = RootWindow(d, s);
sw = XDisplayWidth(d, s);
sh = XDisplayHeight(d, s);
key_grab();