- if (client_normal(it->data) && client_can_focus(it->data)) {
- gboolean r = client_focus(it->data);
- assert(r);
- return;
- }
+ if (client_normal(it->data) && client_can_focus(it->data))
+ return it->data;
+
+ return NULL;
+}
+
+void focus_fallback(ObFocusFallbackType type)
+{
+ ObClient *new;
+
+ /* unfocus any focused clients.. they can be focused by Pointer events
+ and such, and then when I try focus them, I won't get a FocusIn event
+ at all for them.
+ */
+ focus_set_client(NULL);