- ob_debug_type(OB_DEBUG_FOCUS, "Tried to focus window 0x%x but it "
- "is being unmanaged. Falling back focus again.\n");
- focus_tried = focus_fallback(TRUE);
+ ob_debug_type(OB_DEBUG_FOCUS, "Tried to focus window 0x%x and it "
+ "is being unmanaged:\n");
+ if (XCheckIfEvent(ob_display, &ce, look_for_focusin_client, NULL)){
+ XPutBackEvent(ob_display, &ce);
+ ob_debug_type(OB_DEBUG_FOCUS,
+ " but another FocusIn is coming\n");
+ } else {
+ ob_debug_type(OB_DEBUG_FOCUS,
+ " so falling back focus again.\n");
+ focus_tried = focus_fallback(TRUE);
+ }