diff --git a/awesome.c b/awesome.c index f34ad7f8..d4d77e05 100644 --- a/awesome.c +++ b/awesome.c @@ -154,7 +154,7 @@ scan(Display *disp, int screen, DC *drawcontext, awesome_config *awesomeconf) || XGetTransientForHint(disp, wins[i], &d1)) continue; if(wa.map_state == IsViewable || getstate(disp, wins[i]) == IconicState) - manage(disp, screen, drawcontext, wins[i], &wa, awesomeconf); + manage(disp, drawcontext, wins[i], &wa, awesomeconf); } /* now the transients */ for(i = 0; i < num; i++) @@ -163,7 +163,7 @@ scan(Display *disp, int screen, DC *drawcontext, awesome_config *awesomeconf) continue; if(XGetTransientForHint(disp, wins[i], &d1) && (wa.map_state == IsViewable || getstate(disp, wins[i]) == IconicState)) - manage(disp, screen, drawcontext, wins[i], &wa, awesomeconf); + manage(disp, drawcontext, wins[i], &wa, awesomeconf); } } if(wins) diff --git a/client.c b/client.c index 491ea961..4d1a90e8 100644 --- a/client.c +++ b/client.c @@ -348,7 +348,7 @@ loadprops(Client * c, int ntags) } void -manage(Display * disp, int screen, DC *drawcontext, Window w, XWindowAttributes * wa, awesome_config *awesomeconf) +manage(Display * disp, DC *drawcontext, Window w, XWindowAttributes * wa, awesome_config *awesomeconf) { int i; Client *c, *t = NULL; @@ -366,9 +366,9 @@ manage(Display * disp, int screen, DC *drawcontext, Window w, XWindowAttributes c->h = c->rh = wa->height; c->oldborder = wa->border_width; c->display = disp; - c->screen = screen; - if(c->w == DisplayWidth(disp, screen) - && c->h == DisplayHeight(disp, screen)) + c->screen = awesomeconf->screen; + if(c->w == DisplayWidth(disp, c->screen) + && c->h == DisplayHeight(disp, c->screen)) { c->x = 0; c->y = 0; @@ -376,7 +376,7 @@ manage(Display * disp, int screen, DC *drawcontext, Window w, XWindowAttributes } else { - ScreenInfo *si = get_display_info(disp, screen, awesomeconf->statusbar); + ScreenInfo *si = get_display_info(disp, c->screen, awesomeconf->statusbar); if(c->x + c->w + 2 * c->border > si->x_org + si->width) c->x = c->rx = si->x_org + si->width - c->w - 2 * c->border; diff --git a/client.h b/client.h index 0d471839..abea060a 100644 --- a/client.h +++ b/client.h @@ -60,7 +60,7 @@ void ban(Client *); /* bans c */ void configure(Client *); /* send synthetic configure event */ void detach(Client *); /* detaches c from global client list */ void focus(Display *, DC *, Client *, Bool, awesome_config *); /* focus c if visible && !NULL, or focus top visible */ -void manage(Display *, int, DC *, Window, XWindowAttributes *, awesome_config *); /* manage new client */ +void manage(Display *, DC *, Window, XWindowAttributes *, awesome_config *); void resize(Client *, int, int, int, int, Bool); /* resize with given coordinates c */ void unban(Client *); /* unbans c */ void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */ diff --git a/event.c b/event.c index 846b4740..63e4d468 100644 --- a/event.c +++ b/event.c @@ -387,7 +387,7 @@ handle_event_maprequest(XEvent * e, awesome_config *awesomeconf) if(!getclient(ev->window)) { for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++); - manage(e->xany.display, screen, &dc[screen], ev->window, &wa, &awesomeconf[screen]); + manage(e->xany.display, &dc[screen], ev->window, &wa, &awesomeconf[screen]); } }