all repos — openbox @ 3e8d8108e747e9d04fa7bb992b75c6cd3ed9187b

openbox fork - make it a bit more like ryudo

when focus goes to the root window, and it is coming from another screen, fall back to a client
Dana Jansens danakj@orodu.net
commit

3e8d8108e747e9d04fa7bb992b75c6cd3ed9187b

parent

6e5d9c533700685c0553c00654599f636921fd2e

1 files changed, 14 insertions(+), 4 deletions(-)

jump to
M openbox/event.copenbox/event.c

@@ -306,7 +306,9 @@ return FALSE;

/* This means focus reverted off of a client */ else if (detail == NotifyPointerRoot || detail == NotifyDetailNone || - detail == NotifyInferior) + detail == NotifyInferior || + /* This means focus got here from another screen */ + detail == NotifyNonlinear) return TRUE; else return FALSE;

@@ -487,12 +489,20 @@ event_handle_menu(e);

} else if (e->type == FocusIn) { if (e->xfocus.detail == NotifyPointerRoot || e->xfocus.detail == NotifyDetailNone || - e->xfocus.detail == NotifyInferior) + e->xfocus.detail == NotifyInferior || + e->xfocus.detail == NotifyNonlinear) { XEvent ce; - ob_debug_type(OB_DEBUG_FOCUS, "Focus went to pointer root/none or" - " the frame window\n"); + ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root, " + "pointer root/none or " + "the frame window\n"); + + if (e->xfocus.detail == NotifyInferior || + e->xfocus.detail == NotifyNonlinear) + { + focus_left_screen = FALSE; + } /* If another FocusIn is in the queue then don't fallback yet. This fixes the fun case of: