diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-24 15:29:42 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-24 15:29:42 +0000 |
| commit | d2f7ad9a2480c2810dee5def13cbdee36bd71e5e (patch) | |
| tree | 12f7cfad60f00b5b7229acc3a02e99bd4a1059f6 /openbox/place.c | |
| parent | 0771964c0f3d14992d7d798c317e5e7dde73bb43 (diff) | |
place randomly inside the area available. if its too big, put the top left corner inside still
Diffstat (limited to 'openbox/place.c')
| -rw-r--r-- | openbox/place.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbox/place.c b/openbox/place.c index 5614ecf3..74aa7605 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -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); |
