+/*! Present the client to the user.
+ @param raise If the client should be raised or not. You should only set
+ raise to false if you don't care if the window is completely
+ hidden.
+*/
+static void client_present(ObClient *self, gboolean here, gboolean raise)
+{
+ /* if using focus_delay, stop the timer now so that focus doesn't
+ go moving on us */
+ event_halt_focus_delay();
+
+ if (client_normal(self) && screen_showing_desktop)
+ screen_show_desktop(FALSE, FALSE);
+ if (self->iconic)
+ client_iconify(self, FALSE, here);
+ if (self->desktop != DESKTOP_ALL &&
+ self->desktop != screen_desktop)
+ {
+ if (here)
+ client_set_desktop(self, screen_desktop, FALSE);
+ else
+ screen_set_desktop(self->desktop, FALSE);
+ } else if (!self->frame->visible)
+ /* if its not visible for other reasons, then don't mess
+ with it */
+ return;
+ if (self->shaded)
+ client_shade(self, FALSE);
+
+ client_focus(self);
+
+ if (raise) {
+ /* we do this as an action here. this is rather important. this is
+ because we want the results from the focus change to take place
+ BEFORE we go about raising the window. when a fullscreen window
+ loses focus, we need this or else the raise wont be able to raise
+ above the to-lose-focus fullscreen window. */
+ client_raise(self);
+ }
+}
+