diff --git a/src/client.c b/src/client.c index 521115f..1be48ce 100644 --- a/src/client.c +++ b/src/client.c @@ -904,6 +904,9 @@ client_new(Window w, XWindowAttributes *wa, bool scan) /* Set tag */ client_get_sizeh(c); + if(c->flags & CLIENT_HINT_FLAG /* && OPTIONKIVABIEN */) + c->flags |= CLIENT_FREE; + if(!scan) tag_client((c->flags & CLIENT_RULED ? c->tag : c->screen->seltag), c); diff --git a/src/event.c b/src/event.c index e98d73d..4b5fad0 100644 --- a/src/event.c +++ b/src/event.c @@ -132,12 +132,28 @@ event_configureevent(XEvent *e) if((c = client_gb_win(ev->window))) { - if(ev->value_mask & CWWidth) - _fac_resize(c, Right, ev->width - c->wgeo.w); - if(ev->value_mask & CWHeight) - _fac_resize(c, Bottom, ev->height - c->wgeo.h); + if(c->flags & CLIENT_FREE) + { + if(ev->value_mask & CWX) + c->geo.x = ev->x; + if(ev->value_mask & CWY) + c->geo.y = ev->y; + if(ev->value_mask & CWWidth) + c->geo.w = ev->width + c->border + c->border; + if(ev->value_mask & CWHeight) + c->geo.h = ev->height + c->tbarw + c->border; - client_apply_tgeo(c->tag); + client_moveresize(c, &c->geo); + } + else + { + if(ev->value_mask & CWWidth) + _fac_resize(c, Right, ev->width - c->wgeo.w); + if(ev->value_mask & CWHeight) + _fac_resize(c, Bottom, ev->height - c->wgeo.h); + + client_apply_tgeo(c->tag); + } } else { diff --git a/src/layout.c b/src/layout.c index 7ab1e36..744d024 100644 --- a/src/layout.c +++ b/src/layout.c @@ -319,7 +319,6 @@ layout_split_arrange_closed(struct client *ghost) bool b = false; enum position p; - /* Search for single parent for easy resize * Example case: * ___________ ___________