+ /* have to try focus here because when you leave an empty desktop
+ there is no focus out to watch for
+
+ do this before hiding the windows so if helper windows are coming
+ with us, they don't get hidden
+ */
+ if (dofocus && (c = focus_fallback_target(TRUE, focus_client))) {
+ /* only do the flicker reducing stuff ahead of time if we are going
+ to call xsetinputfocus on the window ourselves. otherwise there is
+ no guarantee the window will actually take focus.. */
+ if (c->can_focus) {
+ /* do this here so that if you switch desktops to a window with
+ helper windows then the helper windows won't flash */
+ client_bring_helper_windows(c);
+ /* reduce flicker by hiliting now rather than waiting for the
+ server FocusIn event */
+ frame_adjust_focus(c->frame, TRUE);
+ }
+ client_focus(c);
+ }
+