From b48c9b6add7d059b2b2e0816d6f90c2d2f38fc48 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 19 Oct 2019 07:49:26 +0300 Subject: [PATCH] sowm: remove root global --- sowm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sowm.c b/sowm.c index 68f6cb6..f459694 100644 --- a/sowm.c +++ b/sowm.c @@ -50,7 +50,6 @@ static int ws = 1, sw, sh, wx, wy; static unsigned int ww, wh; static Display *d; -static Window root; static XButtonEvent mouse; static void (*events[LASTEvent])(XEvent *e) = { @@ -275,10 +274,10 @@ int main(void) { signal(SIGCHLD, SIG_IGN); XSetErrorHandler(xerror); - int s = DefaultScreen(d); - root = RootWindow(d, s); - sw = XDisplayWidth(d, s); - sh = XDisplayHeight(d, s); + int s = DefaultScreen(d); + Window root = RootWindow(d, s); + sw = XDisplayWidth(d, s); + sh = XDisplayHeight(d, s); XSelectInput(d, root, SubstructureRedirectMask); XDefineCursor(d, root, XCreateFontCursor(d, 68));