This commit is contained in:
Julien Danjou 2007-10-15 17:33:28 +02:00
parent d263c89aa4
commit b1e22e1d8b
3 changed files with 5 additions and 11 deletions

View File

@ -172,7 +172,6 @@ scan(awesome_config *awesomeconf)
} }
/** Setup everything before running /** Setup everything before running
* \param screen Screen number
* \param awesomeconf awesome config ref * \param awesomeconf awesome config ref
* \todo clean things... * \todo clean things...
*/ */
@ -196,9 +195,6 @@ setup(awesome_config *awesomeconf)
XSelectInput(awesomeconf->display, RootWindow(awesomeconf->display, awesomeconf->phys_screen), wa.event_mask); XSelectInput(awesomeconf->display, RootWindow(awesomeconf->display, awesomeconf->phys_screen), wa.event_mask);
grabkeys(awesomeconf->display, awesomeconf->phys_screen, awesomeconf); 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 /** Startup Error handler to check if another window manager
@ -321,6 +317,9 @@ main(int argc, char *argv[])
setup(&awesomeconf[screen]); setup(&awesomeconf[screen]);
awesomeconf[screen].clients = clients; awesomeconf[screen].clients = clients;
awesomeconf[screen].client_sel = sel; 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]); drawstatusbar(dpy, &awesomeconf[screen]);
} }
@ -401,7 +400,6 @@ main(int argc, char *argv[])
eprint("select failed\n"); eprint("select failed\n");
} }
if(cfd >= 0 && FD_ISSET(cfd, &rd)) if(cfd >= 0 && FD_ISSET(cfd, &rd))
{
switch (r = read(cfd, buf, sizeof(buf))) switch (r = read(cfd, buf, sizeof(buf)))
{ {
case -1: case -1:
@ -418,8 +416,6 @@ main(int argc, char *argv[])
default: default:
parse_control(buf, awesomeconf); parse_control(buf, awesomeconf);
} }
drawstatusbar(dpy, &awesomeconf[0]);
}
while(XPending(dpy)) while(XPending(dpy))
{ {

View File

@ -237,8 +237,8 @@ attach(Client **head, Client *c)
void void
updatetitle(Client *c) updatetitle(Client *c)
{ {
if(!xgettextprop(c->display, c->win, XInternAtom(c->display, "_NET_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); xgettextprop(c->display, c->win, XInternAtom(c->display, "WM_NAME", False), c->name, sizeof(c->name));
} }
/** Ban client and unmapped it /** Ban client and unmapped it

View File

@ -412,11 +412,9 @@ get_numlockmask(Display *disp)
modmap = XGetModifierMapping(disp); modmap = XGetModifierMapping(disp);
for(i = 0; i < 8; i++) for(i = 0; i < 8; i++)
for(j = 0; j < modmap->max_keypermod; j++) for(j = 0; j < modmap->max_keypermod; j++)
{
if(modmap->modifiermap[i * modmap->max_keypermod + j] if(modmap->modifiermap[i * modmap->max_keypermod + j]
== XKeysymToKeycode(disp, XK_Num_Lock)) == XKeysymToKeycode(disp, XK_Num_Lock))
mask = (1 << i); mask = (1 << i);
}
XFreeModifiermap(modmap); XFreeModifiermap(modmap);