Fix screen_update_sel and configure event size given to fac_resize

This commit is contained in:
Martin Duquesnoy 2011-10-25 23:06:01 +02:00
parent 31e9b4256a
commit cd44d17e19
3 changed files with 8 additions and 3 deletions

View File

@ -528,7 +528,9 @@ client_frame_new(struct client *c)
struct client*
client_new(Window w, XWindowAttributes *wa)
{
struct client *c = xcalloc(1, sizeof(struct client));
struct client *c = NULL;
c = xcalloc(1, sizeof(struct client));
/* C attributes */
c->win = w;

View File

@ -79,9 +79,9 @@ event_configureevent(XEvent *e)
c->geo.y = ev->y; */
if(ev->value_mask & CWWidth)
_fac_resize(c, Right, (ev->width - c->geo.w));
_fac_resize(c, Right, (ev->width - (c->geo.w - c->border - c->border)));
if(ev->value_mask & CWHeight)
_fac_resize(c, Bottom, (ev->height - c->geo.h));
_fac_resize(c, Bottom, (ev->height - (c->geo.h - c->tbarw)));
client_apply_tgeo(c->tag);
}

View File

@ -90,6 +90,9 @@ screen_update_sel(void)
if(INAREA(x, y, s->geo))
break;
if(!s)
s = SLIST_FIRST(&W->h.screen);
return (W->screen = s);
}
#endif /* HAVE_XINERAMA */