+ 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) */
+ transient ||
+ (((self->positioned & PPosition) &&
+ !(self->positioned & USPosition)) &&
+ client_normal(self) &&
+ !self->session));
+ }
+
+ /* do this after the window is placed, so the premax/prefullscreen numbers
+ won't be all wacko!!
+ also, this moves the window to the position where it has been placed
+ */
+ ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",
+ self->window, newx, newy, self->area.width, self->area.height);
+ client_apply_startup_state(self, newx, newy);
+
+ keyboard_grab_for_client(self, TRUE);
+ mouse_grab_for_client(self, TRUE);
+
+ if (activate) {
+ guint32 last_time = focus_client ?
+ focus_client->user_time : CurrentTime;
+
+ /* This is focus stealing prevention */
+ ob_debug("Want to focus new window 0x%x with time %u (last time %u)\n",
+ self->window, self->user_time, last_time);
+
+ /* If a nothing at all, or a parent was focused, then focus this
+ always
+ */
+ if (!focus_client || client_search_focus_parent(self) != NULL)
+ activate = TRUE;
+ else
+ {
+ /* If time stamp is old, don't steal focus */
+ if (self->user_time && last_time &&
+ !event_time_after(self->user_time, last_time))
+ {
+ activate = FALSE;
+ }
+ /* Don't steal focus from globally active clients.
+ I stole this idea from KWin. It seems nice.
+ */
+ if (!(focus_client->can_focus || focus_client->focus_notify))
+ activate = FALSE;
+ }