ignore some focus events that shouldnt be reacted to
This commit is contained in:
parent
dc43b74abd
commit
eb1cd9cc49
1 changed files with 6 additions and 5 deletions
|
@ -348,10 +348,6 @@ static gboolean wanted_focusevent(XEvent *e)
|
||||||
if (detail == NotifyNonlinearVirtual)
|
if (detail == NotifyNonlinearVirtual)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* This means focus reverted off of a client */
|
|
||||||
if (detail == NotifyInferior)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
/* Otherwise.. */
|
/* Otherwise.. */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -391,7 +387,12 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
|
||||||
{
|
{
|
||||||
switch(e->type) {
|
switch(e->type) {
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
|
if (!wanted_focusevent(e))
|
||||||
|
return TRUE;
|
||||||
|
break;
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
|
if (client == NULL)
|
||||||
|
return TRUE;
|
||||||
if (!wanted_focusevent(e))
|
if (!wanted_focusevent(e))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -454,7 +455,7 @@ static void event_process(const XEvent *ec, gpointer data)
|
||||||
event_handle_menu(e);
|
event_handle_menu(e);
|
||||||
} 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) {
|
||||||
ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root\n");
|
ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root\n");
|
||||||
/* Focus has been reverted to the root window or nothing
|
/* Focus has been reverted to the root window or nothing
|
||||||
FocusOut events come after UnmapNotify, so we don't need to
|
FocusOut events come after UnmapNotify, so we don't need to
|
||||||
|
|
Loading…
Reference in a new issue