From b1e22e1d8b7900cc16c2e19e2e4466de07729282 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 15 Oct 2007 17:33:28 +0200 Subject: [PATCH] cosmetic --- awesome.c | 10 +++------- client.c | 4 ++-- config.c | 2 -- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/awesome.c b/awesome.c index 3d303395..1c3613c7 100644 --- a/awesome.c +++ b/awesome.c @@ -172,7 +172,6 @@ scan(awesome_config *awesomeconf) } /** Setup everything before running - * \param screen Screen number * \param awesomeconf awesome config ref * \todo clean things... */ @@ -196,9 +195,6 @@ setup(awesome_config *awesomeconf) XSelectInput(awesomeconf->display, RootWindow(awesomeconf->display, awesomeconf->phys_screen), wa.event_mask); grabkeys(awesomeconf->display, awesomeconf->phys_screen, awesomeconf); - - /* bar */ - initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, awesomeconf->cursor[CurNormal], awesomeconf->font, awesomeconf->layouts, awesomeconf->nlayouts); } /** Startup Error handler to check if another window manager @@ -321,6 +317,9 @@ main(int argc, char *argv[]) setup(&awesomeconf[screen]); awesomeconf[screen].clients = clients; awesomeconf[screen].client_sel = sel; + initstatusbar(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar, + awesomeconf->cursor[CurNormal], awesomeconf->font, + awesomeconf->layouts, awesomeconf->nlayouts); drawstatusbar(dpy, &awesomeconf[screen]); } @@ -401,7 +400,6 @@ main(int argc, char *argv[]) eprint("select failed\n"); } if(cfd >= 0 && FD_ISSET(cfd, &rd)) - { switch (r = read(cfd, buf, sizeof(buf))) { case -1: @@ -418,8 +416,6 @@ main(int argc, char *argv[]) default: parse_control(buf, awesomeconf); } - drawstatusbar(dpy, &awesomeconf[0]); - } while(XPending(dpy)) { diff --git a/client.c b/client.c index 07ea6603..11f9f0eb 100644 --- a/client.c +++ b/client.c @@ -237,8 +237,8 @@ attach(Client **head, Client *c) void updatetitle(Client *c) { - if(!xgettextprop(c->display, c->win, XInternAtom(c->display, "_NET_WM_NAME", False), c->name, sizeof c->name)) - xgettextprop(c->display, c->win, XInternAtom(c->display, "WM_NAME", False), c->name, sizeof c->name); + if(!xgettextprop(c->display, c->win, XInternAtom(c->display, "_NET_WM_NAME", False), c->name, sizeof(c->name))) + xgettextprop(c->display, c->win, XInternAtom(c->display, "WM_NAME", False), c->name, sizeof(c->name)); } /** Ban client and unmapped it diff --git a/config.c b/config.c index 0ffc9661..10e6bbb8 100644 --- a/config.c +++ b/config.c @@ -412,11 +412,9 @@ get_numlockmask(Display *disp) modmap = XGetModifierMapping(disp); for(i = 0; i < 8; i++) for(j = 0; j < modmap->max_keypermod; j++) - { if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(disp, XK_Num_Lock)) mask = (1 << i); - } XFreeModifiermap(modmap);