{
GList *it;
guint old;
+ XEvent e;
g_assert(num < screen_num_desktops);
if (old == num) return;
+ g_message("Moving to desktop %d", num+1);
+
/* show windows before hiding the rest to lessen the enter/leave events */
/* show windows from top to bottom */
engine_frame_hide(c->frame);
}
+ /* focus the last focused window on the desktop, and ignore enter events
+ from the switch so it doesnt mess with the focus */
+ XSync(ob_display, FALSE);
+ while (XCheckTypedEvent(ob_display, EnterNotify, &e));
+ focus_fallback(TRUE);
+
dispatch_ob(Event_Ob_Desktop, num, old);
}