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);
place_random(client, x, y))))
g_assert_not_reached(); /* the last one better succeed */
/* get where the client should be */
- frame_frame_gravity(client->frame, x, y);
+ frame_frame_gravity(client->frame, x, y,
+ client->area.width, client->area.height);
return ret;
}