rename and document client_attach/detach
This commit is contained in:
parent
222b3dcc2d
commit
8a1633ccbe
10
client.c
10
client.c
|
@ -231,10 +231,11 @@ client_swap(Client **head, Client *c1, Client *c2)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Attach client to the beginning of the clients stack
|
/** Attach client to the beginning of the clients stack
|
||||||
|
* \param head client list
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
attach(Client **head, Client *c)
|
client_attach(Client **head, Client *c)
|
||||||
{
|
{
|
||||||
if(*head)
|
if(*head)
|
||||||
(*head)->prev = c;
|
(*head)->prev = c;
|
||||||
|
@ -284,10 +285,11 @@ configure(Client * c)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Detach client from clients list
|
/** Detach client from clients list
|
||||||
|
* \param head client list
|
||||||
* \param c client to detach
|
* \param c client to detach
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
detach(Client **head, Client *c)
|
client_detach(Client **head, Client *c)
|
||||||
{
|
{
|
||||||
if(c->prev)
|
if(c->prev)
|
||||||
c->prev->next = c->next;
|
c->prev->next = c->next;
|
||||||
|
@ -446,7 +448,7 @@ manage(Display *disp, Window w, XWindowAttributes *wa, awesome_config *awesomeco
|
||||||
if(!c->isfloating)
|
if(!c->isfloating)
|
||||||
c->isfloating = (rettrans == Success) || c->isfixed;
|
c->isfloating = (rettrans == Success) || c->isfixed;
|
||||||
saveprops(c, awesomeconf->ntags);
|
saveprops(c, awesomeconf->ntags);
|
||||||
attach(awesomeconf->clients, c);
|
client_attach(awesomeconf->clients, c);
|
||||||
XMoveResizeWindow(disp, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
|
XMoveResizeWindow(disp, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
|
||||||
c->isbanned = True;
|
c->isbanned = True;
|
||||||
arrange(awesomeconf);
|
arrange(awesomeconf);
|
||||||
|
@ -573,7 +575,7 @@ unmanage(Client * c, long state, awesome_config *awesomeconf)
|
||||||
/* The server grab construct avoids race conditions. */
|
/* The server grab construct avoids race conditions. */
|
||||||
XGrabServer(c->display);
|
XGrabServer(c->display);
|
||||||
XConfigureWindow(c->display, c->win, CWBorderWidth, &wc); /* restore border */
|
XConfigureWindow(c->display, c->win, CWBorderWidth, &wc); /* restore border */
|
||||||
detach(awesomeconf->clients, c);
|
client_detach(awesomeconf->clients, c);
|
||||||
if(*awesomeconf->client_sel == c)
|
if(*awesomeconf->client_sel == c)
|
||||||
focus(NULL, True, awesomeconf);
|
focus(NULL, True, awesomeconf);
|
||||||
XUngrabButton(c->display, AnyButton, AnyModifier, c->win);
|
XUngrabButton(c->display, AnyButton, AnyModifier, c->win);
|
||||||
|
|
4
client.h
4
client.h
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
Client * get_client_bywin(Client **, Window);
|
Client * get_client_bywin(Client **, Window);
|
||||||
void grabbuttons(Client *, Bool, Bool, KeySym, unsigned int);
|
void grabbuttons(Client *, Bool, Bool, KeySym, unsigned int);
|
||||||
inline void attach(Client **, Client *);
|
inline void client_attach(Client **, Client *);
|
||||||
inline void detach(Client **, Client *);
|
inline void client_detach(Client **, Client *);
|
||||||
void ban(Client *); /* bans c */
|
void ban(Client *); /* bans c */
|
||||||
void configure(Client *); /* send synthetic configure event */
|
void configure(Client *); /* send synthetic configure event */
|
||||||
void focus(Client *, Bool, awesome_config *);
|
void focus(Client *, Bool, awesome_config *);
|
||||||
|
|
4
layout.c
4
layout.c
|
@ -296,8 +296,8 @@ uicb_zoom(awesome_config *awesomeconf,
|
||||||
{
|
{
|
||||||
if(!*awesomeconf->client_sel)
|
if(!*awesomeconf->client_sel)
|
||||||
return;
|
return;
|
||||||
detach(awesomeconf->clients, *awesomeconf->client_sel);
|
client_detach(awesomeconf->clients, *awesomeconf->client_sel);
|
||||||
attach(awesomeconf->clients, *awesomeconf->client_sel);
|
client_attach(awesomeconf->clients, *awesomeconf->client_sel);
|
||||||
focus(*awesomeconf->client_sel, True, awesomeconf);
|
focus(*awesomeconf->client_sel, True, awesomeconf);
|
||||||
arrange(awesomeconf);
|
arrange(awesomeconf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue