From a5503f81599ad2014d7844844b6ebb610ba8c12b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 16 Oct 2019 15:50:10 +0300 Subject: [PATCH] sowm: avoid global and remove uneeded initial value. --- sowm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sowm.c b/sowm.c index 2d3fec3..5075d4f 100644 --- a/sowm.c +++ b/sowm.c @@ -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();