From 0981683f1e09973f4dddfe92d0200752b4eda897 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 21 Nov 2021 06:24:15 +0500 Subject: [PATCH] Improve code in "src/dwm.c" --- src/dwm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/dwm.c b/src/dwm.c index bbbe316..4efd517 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -237,7 +237,16 @@ static Unit global_unit = NULL; static const char broken[] = "broken"; static int (*xerrorxlib)(Display *, XErrorEvent *); static unsigned int numlockmask = 0; -static void (*handler[LASTEvent]) (XEvent *) = { +static Atoms atoms = NULL; +static int running = 1; +static Cur *cursor[CurLast]; +static Clr **scheme; +static Display *dpy; +static Drw *drw; +static Monitor *mons, *selmon; +static Window root, wmcheckwin; + +static void (*handler[LASTEvent])(XEvent*) = { [ButtonPress] = on_button_press, [ClientMessage] = on_client_message, [ConfigureRequest] = on_configure_request, @@ -250,14 +259,6 @@ static void (*handler[LASTEvent]) (XEvent *) = { [PropertyNotify] = on_property_notify, [UnmapNotify] = on_unmap_notify }; -static Atoms atoms = NULL; -static int running = 1; -static Cur *cursor[CurLast]; -static Clr **scheme; -static Display *dpy; -static Drw *drw; -static Monitor *mons, *selmon; -static Window root, wmcheckwin; /*************************************************************** * configuration, allows nested code to access above variables *