From 3cc299537e1c019e0e61497d3f48b3570bc73a81 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sat, 20 Oct 2012 19:45:18 +0200 Subject: [PATCH] add some comments to setup() --- dunst.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dunst.c b/dunst.c index 1522cbf..b112a1e 100644 --- a/dunst.c +++ b/dunst.c @@ -1277,11 +1277,11 @@ void update_screen_info() void setup(void) { + /* initialize dc, font, keyboard, colors */ dc = initdc(); initfont(dc, font); - init_shortcut(&close_ks); init_shortcut(&close_all_ks); init_shortcut(&history_ks); @@ -1305,8 +1305,8 @@ void setup(void) color_strings[ColBG][NORM] = normbgcolor; color_strings[ColBG][CRIT] = critbgcolor; - scr.scr = monitor; + /* parse and set geometry and monitor position */ if (geom[0] == '-') { geometry.negative_width = true; geom++; @@ -1318,19 +1318,19 @@ void setup(void) &geometry.x, &geometry.y, &geometry.w, &geometry.h); - - screensaver_info = XScreenSaverAllocInfo(); - window_dim.x = 0; window_dim.y = 0; window_dim.w = 0; window_dim.h = 0; + screensaver_info = XScreenSaverAllocInfo(); + + scr.scr = monitor; if (scr.scr < 0) { scr.scr = DefaultScreen(dc->dpy); } - /* window */ + /* initialize window */ Window root; XSetWindowAttributes wa;