Fix configureevent with free mode, set hinted client as free

This commit is contained in:
Martin Duquesnoy 2012-01-27 18:45:58 +01:00
parent aa71bf00f9
commit 409d26bf7b
3 changed files with 24 additions and 6 deletions

View File

@ -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);

View File

@ -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
{

View File

@ -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:
* ___________ ___________