arrange() does not need Display as arg
This commit is contained in:
parent
17bc4dc9a7
commit
ccb7e89750
8
client.c
8
client.c
|
@ -441,7 +441,7 @@ manage(Display *disp, Window w, XWindowAttributes *wa, awesome_config *awesomeco
|
|||
attach(awesomeconf->clients, c);
|
||||
XMoveResizeWindow(disp, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
|
||||
c->isbanned = True;
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -573,7 +573,7 @@ unmanage(Client * c, long state, awesome_config *awesomeconf)
|
|||
XSetErrorHandler(xerror);
|
||||
XUngrabServer(c->display);
|
||||
if(state != NormalState)
|
||||
arrange(c->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
p_delete(&c->tags);
|
||||
p_delete(&c);
|
||||
}
|
||||
|
@ -732,7 +732,7 @@ uicb_swapnext(awesome_config *awesomeconf,
|
|||
if(next)
|
||||
{
|
||||
client_swap(awesomeconf->clients, *awesomeconf->client_sel, next);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -749,7 +749,7 @@ uicb_swapprev(awesome_config *awesomeconf,
|
|||
if(prev)
|
||||
{
|
||||
client_swap(awesomeconf->clients, prev, *awesomeconf->client_sel);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
event.c
4
event.c
|
@ -328,7 +328,7 @@ handle_event_configurenotify(XEvent * e, awesome_config *awesomeconf)
|
|||
awesomeconf[screen].statusbar.height);
|
||||
|
||||
updatebarpos(e->xany.display, awesomeconf[screen].statusbar);
|
||||
arrange(e->xany.display, &awesomeconf[screen]);
|
||||
arrange(&awesomeconf[screen]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf)
|
|||
case XA_WM_TRANSIENT_FOR:
|
||||
XGetTransientForHint(e->xany.display, c->win, &trans);
|
||||
if(!c->isfloating && (c->isfloating = (get_client_bywin(awesomeconf->clients, trans) != NULL)))
|
||||
arrange(e->xany.display, &awesomeconf[c->screen]);
|
||||
arrange(&awesomeconf[c->screen]);
|
||||
break;
|
||||
case XA_WM_NORMAL_HINTS:
|
||||
updatesizehints(c);
|
||||
|
|
12
layout.c
12
layout.c
|
@ -34,7 +34,7 @@
|
|||
* \param awesomeconf awesome config
|
||||
*/
|
||||
void
|
||||
arrange(Display * disp, awesome_config *awesomeconf)
|
||||
arrange(awesome_config *awesomeconf)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
|
@ -47,8 +47,8 @@ arrange(Display * disp, awesome_config *awesomeconf)
|
|||
ban(c);
|
||||
}
|
||||
awesomeconf->current_layout->arrange(awesomeconf);
|
||||
focus(disp, NULL, True, awesomeconf);
|
||||
restack(disp, awesomeconf);
|
||||
focus(awesomeconf->display, NULL, True, awesomeconf);
|
||||
restack(awesomeconf->display, awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -193,7 +193,7 @@ uicb_setlayout(awesome_config * awesomeconf,
|
|||
c->ftview = True;
|
||||
|
||||
if(*awesomeconf->client_sel)
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
else
|
||||
drawstatusbar(awesomeconf);
|
||||
|
||||
|
@ -230,7 +230,7 @@ maximize(int x, int y, int w, int h, awesome_config *awesomeconf)
|
|||
else
|
||||
(*awesomeconf->client_sel)->isfloating = False;
|
||||
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -286,7 +286,7 @@ uicb_zoom(awesome_config *awesomeconf,
|
|||
detach(awesomeconf->clients, *awesomeconf->client_sel);
|
||||
attach(awesomeconf->clients, *awesomeconf->client_sel);
|
||||
focus(awesomeconf->display, *awesomeconf->client_sel, True, awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
2
layout.h
2
layout.h
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||
|
||||
void arrange(Display *, awesome_config *); /* arranges all windows depending on the layout in use */
|
||||
void arrange(awesome_config *); /* arranges all windows depending on the layout in use */
|
||||
void restack(Display *, awesome_config *); /* restores z layers of all clients */
|
||||
void loadawesomeprops(awesome_config *);
|
||||
void saveawesomeprops(awesome_config *);
|
||||
|
|
|
@ -39,7 +39,7 @@ uicb_setnmaster(awesome_config *awesomeconf,
|
|||
if((awesomeconf->nmaster = (int) compute_new_value_from_arg(arg, (double) awesomeconf->nmaster)) < 0)
|
||||
awesomeconf->nmaster = 0;
|
||||
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -52,7 +52,7 @@ uicb_setncol(awesome_config *awesomeconf,
|
|||
if((awesomeconf->ncol = (int) compute_new_value_from_arg(arg, (double) awesomeconf->ncol)) < 1)
|
||||
awesomeconf->ncol = 1;
|
||||
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -78,7 +78,7 @@ uicb_setmwfact(awesome_config * awesomeconf,
|
|||
else if(awesomeconf->mwfact > 0.9)
|
||||
awesomeconf->mwfact = 0.9;
|
||||
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
p_delete(&newarg);
|
||||
}
|
||||
|
||||
|
|
4
screen.c
4
screen.c
|
@ -246,7 +246,7 @@ uicb_movetoscreen(awesome_config * awesomeconf,
|
|||
prev_screen = (*awesomeconf->client_sel)->screen;
|
||||
move_client_to_screen(*awesomeconf->client_sel, &awesomeconf[new_screen - awesomeconf->screen], True);
|
||||
move_mouse_pointer_to_screen(awesomeconf->display, new_screen);
|
||||
arrange(awesomeconf->display, &awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
arrange(awesomeconf->display, &awesomeconf[new_screen - awesomeconf->screen]);
|
||||
arrange(&awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
arrange(&awesomeconf[new_screen - awesomeconf->screen]);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -247,7 +247,7 @@ uicb_togglebar(awesome_config *awesomeconf,
|
|||
else
|
||||
awesomeconf->statusbar.position = BarOff;
|
||||
updatebarpos(awesomeconf->display, awesomeconf->statusbar);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
|
||||
|
|
8
tab.c
8
tab.c
|
@ -85,7 +85,7 @@ uicb_tab(awesome_config *awesomeconf,
|
|||
c->tab.prev = tmp;
|
||||
|
||||
c->tab.isvisible = False;
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
focus(awesomeconf->display, sel, True, awesomeconf);
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ uicb_untab(awesome_config *awesomeconf,
|
|||
return;
|
||||
|
||||
client_untab(sel);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
focus(awesomeconf->display, sel, True, awesomeconf);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ uicb_viewnexttab(awesome_config *awesomeconf,
|
|||
|
||||
sel->tab.isvisible = False;
|
||||
sel->tab.next->tab.isvisible = True;
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
focus(awesomeconf->display, sel->tab.next, True, awesomeconf);
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ uicb_viewprevtab(awesome_config *awesomeconf,
|
|||
|
||||
sel->tab.isvisible = False;
|
||||
sel->tab.prev->tab.isvisible = True;
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
focus(awesomeconf->display, sel->tab.prev, True, awesomeconf);
|
||||
}
|
||||
|
||||
|
|
16
tag.c
16
tag.c
|
@ -158,7 +158,7 @@ uicb_tag(awesome_config *awesomeconf,
|
|||
if(i >= 0 && i < awesomeconf->ntags)
|
||||
(*awesomeconf->client_sel)->tags[i] = True;
|
||||
saveprops(*awesomeconf->client_sel, awesomeconf->ntags);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** Toggle floating state of a client
|
||||
|
@ -190,7 +190,7 @@ uicb_togglefloating(awesome_config * awesomeconf,
|
|||
}
|
||||
client_untab(*awesomeconf->client_sel);
|
||||
saveprops(*awesomeconf->client_sel, awesomeconf->ntags);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** Toggle tag view
|
||||
|
@ -212,7 +212,7 @@ uicb_toggletag(awesome_config *awesomeconf,
|
|||
if(j == awesomeconf->ntags)
|
||||
(*awesomeconf->client_sel)->tags[i] = True;
|
||||
saveprops(*awesomeconf->client_sel, awesomeconf->ntags);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** Add a tag to viewed tags
|
||||
|
@ -232,7 +232,7 @@ uicb_toggleview(awesome_config *awesomeconf,
|
|||
if(j == awesomeconf->ntags)
|
||||
awesomeconf->tags[i].selected = True;
|
||||
saveawesomeprops(awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** View tag
|
||||
|
@ -258,7 +258,7 @@ uicb_view(awesome_config *awesomeconf,
|
|||
awesomeconf->current_layout = awesomeconf->tags[i].layout;
|
||||
}
|
||||
saveawesomeprops(awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** View previously selected tags
|
||||
|
@ -279,7 +279,7 @@ uicb_tag_prev_selected(awesome_config *awesomeconf,
|
|||
awesomeconf->tags[i].selected = awesomeconf->tags[i].was_selected;
|
||||
awesomeconf->tags[i].was_selected = t;
|
||||
}
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** View next tag
|
||||
|
@ -304,7 +304,7 @@ uicb_tag_viewnext(awesome_config *awesomeconf,
|
|||
awesomeconf->tags[firsttag].selected = True;
|
||||
awesomeconf->current_layout = awesomeconf->tags[firsttag].layout;
|
||||
saveawesomeprops(awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
|
||||
/** View previous tag
|
||||
|
@ -329,6 +329,6 @@ uicb_tag_viewprev(awesome_config *awesomeconf,
|
|||
awesomeconf->tags[firsttag].selected = True;
|
||||
awesomeconf->current_layout = awesomeconf->tags[firsttag].layout;
|
||||
saveawesomeprops(awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
Loading…
Reference in New Issue