summaryrefslogtreecommitdiff
path: root/openbox/place.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2005-02-06 01:43:37 +0000
committerMikael Magnusson <mikachu@comhem.se>2005-02-06 01:43:37 +0000
commit52c345c3002fe7bb134d35cb5446fa2601ff192f (patch)
treee563e46c2078bc3449ecd4157900a02aa8df7871 /openbox/place.c
parent60565bcba8bd5e42f82659b4aa641b05c5ec70a0 (diff)
try moving the move_onscreen with the rude into the place routine so it only gets called if a window doesn't specify a position
Diffstat (limited to 'openbox/place.c')
-rw-r--r--openbox/place.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbox/place.c b/openbox/place.c
index 6669a28e..86af6b9d 100644
--- a/openbox/place.c
+++ b/openbox/place.c
@@ -385,6 +385,15 @@ void place_client(ObClient *client, gint *x, gint *y)
place_smart(client, x, y, SMART_FOCUSED) ||
place_random(client, x, y)))
{
+ /* make sure the window is visible. */
+ client_find_onscreen(client, x, y,
+ client->frame->area.width,
+ client->frame->area.height,
+ /* non-normal clients has less rules, and
+ windows that are being restored from a session
+ do also. we can assume you want it back where
+ you saved it */
+ client_normal(client) && !client->session);
/* get where the client should be */
frame_frame_gravity(client->frame, x, y);
} else