- /* make sure the window is visible.
-
- this is about the rude parameter:
- 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_move_onscreen(self, client_normal(self) && !self->session);
+ /* 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. Clients saying
+ they placed themselves are subjected to
+ harder rules, ones that are placed by
+ place.c or by the user are allowed partially
+ off-screen and on xinerama divides (ie,
+ it is up to the placement routines to avoid
+ the xinerama divides) */
+ ((self->positioned & PPosition) &&
+ !(self->positioned & USPosition)) &&
+ client_normal(self) &&
+ !self->session);
+ if (x != ox || y != oy)
+ client_move(self, x, y);