diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2005-02-06 01:43:37 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2005-02-06 01:43:37 +0000 |
| commit | 52c345c3002fe7bb134d35cb5446fa2601ff192f (patch) | |
| tree | e563e46c2078bc3449ecd4157900a02aa8df7871 /openbox | |
| parent | 60565bcba8bd5e42f82659b4aa641b05c5ec70a0 (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')
| -rw-r--r-- | openbox/client.c | 12 | ||||
| -rw-r--r-- | openbox/place.c | 9 |
2 files changed, 10 insertions, 11 deletions
diff --git a/openbox/client.c b/openbox/client.c index 2b30bddf..03789466 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -344,16 +344,6 @@ void client_manage(Window window) place_client(self, &x, &y); - - /* make sure the window is visible. */ - client_find_onscreen(self, &x, &y, - self->frame->area.width, - self->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(self) && !self->session); if (x != ox || y != oy) client_move(self, x, y); } @@ -628,7 +618,7 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h, /* This here doesn't let windows even a pixel outside the screen, * not applied to all windows. Not sure if it's going to stay at all. * I wonder if disabling this will break struts somehow? Let's find out. */ - if (0 && rude) { + if (rude) { /* avoid the xinerama monitor divide while we're at it, * remember to fix the placement stuff to avoid it also and * then remove this XXX */ 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 |
