Add split_vmirror & split_hmirror layout function: http://ompldr.org/vYWgzZw
This commit is contained in:
parent
736b55b6c7
commit
db0f2d27fd
@ -30,6 +30,10 @@ static const struct { char *name; void (*func)(Uicb cmd); } uicb_list[] =
|
||||
{ "tag_next", uicb_tag_next },
|
||||
{ "tag_prev", uicb_tag_prev },
|
||||
|
||||
/* Layout */
|
||||
{ "split_vmirror", uicb_layout_split_vmirror },
|
||||
{ "split_hmirror", uicb_layout_split_hmirror },
|
||||
|
||||
/* Client */
|
||||
{ "client_close", uicb_client_close },
|
||||
{ "client_resize_right", uicb_client_resize_Right },
|
||||
|
||||
@ -168,3 +168,30 @@ layout_split_integrate(struct client *c, struct client *sc)
|
||||
client_moveresize(c, g);
|
||||
}
|
||||
|
||||
/*
|
||||
* Really simple functions, don't need static no-uicb backend
|
||||
* so we evitate if(vertical) .. else
|
||||
*/
|
||||
void
|
||||
uicb_layout_split_vmirror(Uicb cmd)
|
||||
{
|
||||
struct client *c;
|
||||
|
||||
SLIST_FOREACH(c, &W->screen->seltag->clients, tnext)
|
||||
{
|
||||
c->geo.x = W->screen->ugeo.w - (c->geo.x + c->geo.w);
|
||||
client_moveresize(c, c->geo);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
uicb_layout_split_hmirror(Uicb cmd)
|
||||
{
|
||||
struct client *c;
|
||||
|
||||
SLIST_FOREACH(c, &W->screen->seltag->clients, tnext)
|
||||
{
|
||||
c->geo.y = W->screen->ugeo.h - (c->geo.y + c->geo.h);
|
||||
client_moveresize(c, c->geo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,9 @@
|
||||
|
||||
void layout_split_integrate(struct client *c, struct client *sc);
|
||||
void layout_split_arrange_closed(struct client *ghost);
|
||||
void uicb_layout_split_vmirror(Uicb cmd);
|
||||
void uicb_layout_split_hmirror(Uicb cmd);
|
||||
|
||||
|
||||
#endif /* LAYOUT_H */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user