when focus goes to the root window, and it is coming from another screen, fall back to a client
This commit is contained in:
parent
6e5d9c5337
commit
3e8d8108e7
1 changed files with 14 additions and 4 deletions
|
@ -306,7 +306,9 @@ static gboolean wanted_focusevent(XEvent *e, gboolean in_client_only)
|
||||||
/* This means focus reverted off of a client */
|
/* This means focus reverted off of a client */
|
||||||
else if (detail == NotifyPointerRoot ||
|
else if (detail == NotifyPointerRoot ||
|
||||||
detail == NotifyDetailNone ||
|
detail == NotifyDetailNone ||
|
||||||
detail == NotifyInferior)
|
detail == NotifyInferior ||
|
||||||
|
/* This means focus got here from another screen */
|
||||||
|
detail == NotifyNonlinear)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -487,12 +489,20 @@ static void event_process(const XEvent *ec, gpointer data)
|
||||||
} else if (e->type == FocusIn) {
|
} else if (e->type == FocusIn) {
|
||||||
if (e->xfocus.detail == NotifyPointerRoot ||
|
if (e->xfocus.detail == NotifyPointerRoot ||
|
||||||
e->xfocus.detail == NotifyDetailNone ||
|
e->xfocus.detail == NotifyDetailNone ||
|
||||||
e->xfocus.detail == NotifyInferior)
|
e->xfocus.detail == NotifyInferior ||
|
||||||
|
e->xfocus.detail == NotifyNonlinear)
|
||||||
{
|
{
|
||||||
XEvent ce;
|
XEvent ce;
|
||||||
|
|
||||||
ob_debug_type(OB_DEBUG_FOCUS, "Focus went to pointer root/none or"
|
ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root, "
|
||||||
" the frame window\n");
|
"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
|
/* If another FocusIn is in the queue then don't fallback yet. This
|
||||||
fixes the fun case of:
|
fixes the fun case of:
|
||||||
|
|
Loading…
Reference in a new issue