mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
swallow: new window to respect border of parent terminal
This commit is contained in:
parent
f8ae6714db
commit
c2e4fed918
@ -12,6 +12,7 @@ int
|
|||||||
swallow(Client *p, Client *c)
|
swallow(Client *p, Client *c)
|
||||||
{
|
{
|
||||||
Client *s;
|
Client *s;
|
||||||
|
XWindowChanges wc;
|
||||||
|
|
||||||
if (c->noswallow > 0 || c->isterminal)
|
if (c->noswallow > 0 || c->isterminal)
|
||||||
return 0;
|
return 0;
|
||||||
@ -41,7 +42,14 @@ swallow(Client *p, Client *c)
|
|||||||
#if BAR_EWMHTAGS_PATCH
|
#if BAR_EWMHTAGS_PATCH
|
||||||
setfloatinghint(s);
|
setfloatinghint(s);
|
||||||
#endif // BAR_EWMHTAGS_PATCH
|
#endif // BAR_EWMHTAGS_PATCH
|
||||||
|
|
||||||
|
wc.border_width = p->bw;
|
||||||
|
XConfigureWindow(dpy, p->win, CWBorderWidth, &wc);
|
||||||
XMoveResizeWindow(dpy, p->win, s->x, s->y, s->w, s->h);
|
XMoveResizeWindow(dpy, p->win, s->x, s->y, s->w, s->h);
|
||||||
|
#if !BAR_FLEXWINTITLE_PATCH
|
||||||
|
XSetWindowBorder(dpy, p->win, scheme[SchemeNorm][ColBorder].pixel);
|
||||||
|
#endif // BAR_FLEXWINTITLE_PATCH
|
||||||
|
|
||||||
arrange(p->mon);
|
arrange(p->mon);
|
||||||
configure(p);
|
configure(p);
|
||||||
updateclientlist();
|
updateclientlist();
|
||||||
@ -52,6 +60,7 @@ swallow(Client *p, Client *c)
|
|||||||
void
|
void
|
||||||
unswallow(Client *c)
|
unswallow(Client *c)
|
||||||
{
|
{
|
||||||
|
XWindowChanges wc;
|
||||||
c->win = c->swallowing->win;
|
c->win = c->swallowing->win;
|
||||||
|
|
||||||
free(c->swallowing);
|
free(c->swallowing);
|
||||||
@ -64,7 +73,14 @@ unswallow(Client *c)
|
|||||||
updatetitle(c);
|
updatetitle(c);
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
XMapWindow(dpy, c->win);
|
XMapWindow(dpy, c->win);
|
||||||
|
|
||||||
|
wc.border_width = c->bw;
|
||||||
|
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc);
|
||||||
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
||||||
|
#if !BAR_FLEXWINTITLE_PATCH
|
||||||
|
XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
|
||||||
|
#endif // BAR_FLEXWINTITLE_PATCH
|
||||||
|
|
||||||
#if BAR_EWMHTAGS_PATCH
|
#if BAR_EWMHTAGS_PATCH
|
||||||
setfloatinghint(c);
|
setfloatinghint(c);
|
||||||
#endif // BAR_EWMHTAGS_PATCH
|
#endif // BAR_EWMHTAGS_PATCH
|
||||||
|
Loading…
Reference in New Issue
Block a user