place randomly inside the area available. if its too big, put the top left corner inside still

This commit is contained in:
Dana Jansens 2007-04-24 15:29:42 +00:00
parent 0771964c0f
commit d2f7ad9a24

View file

@ -126,9 +126,9 @@ static gboolean place_random(ObClient *client, gint *x, gint *y)
b = areas[i]->y + areas[i]->height - client->frame->area.height;
if (r > l) *x = g_random_int_range(l, r + 1);
else *x = 0;
else *x = areas[i]->x;
if (b > t) *y = g_random_int_range(t, b + 1);
else *y = 0;
else *y = areas[i]->y;
g_free(areas);