more focus fixes. i wish this could end.
This commit is contained in:
parent
7bb829f8b7
commit
137efd1367
2 changed files with 21 additions and 14 deletions
|
@ -219,30 +219,37 @@ void event_process(XEvent *e)
|
||||||
event_lasttime = e->xproperty.time;
|
event_lasttime = e->xproperty.time;
|
||||||
break;
|
break;
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
|
if (e->xfocus.mode == NotifyGrab) return;
|
||||||
|
/* if (e->type == FocusIn && window == focus_backup && focus_client != NULL) {
|
||||||
|
*/
|
||||||
|
/* Something's focused but we got a focus event for the backup
|
||||||
|
window. this means that something unfocused before we received
|
||||||
|
the new FocusIn. Just ignore it, and refocus what should be
|
||||||
|
focused! */
|
||||||
|
/* client_focus(focus_client);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
break;
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
if (e->xfocus.mode == NotifyGrab)
|
if (e->xfocus.mode == NotifyGrab) return;
|
||||||
/*|| e.xfocus.mode == NotifyUngrab ||*/
|
/*|| e.xfocus.mode == NotifyUngrab ||*/
|
||||||
|
|
||||||
/* From Metacity, from WindowMaker, ignore all funky pointer
|
/* From Metacity, from WindowMaker, ignore all funky pointer
|
||||||
root events. Its commented out cuz I don't think we need this
|
root events. Its commented out cuz I don't think we need this
|
||||||
at all. If problems arise we can look into it */
|
at all. If problems arise we can look into it */
|
||||||
/*e.xfocus.detail > NotifyNonlinearVirtual) */
|
/*e.xfocus.detail > NotifyNonlinearVirtual) */
|
||||||
return; /* skip me! */
|
|
||||||
if (e->type == FocusOut) {
|
/* FocusOut events just make us look for FocusIn events. They
|
||||||
/* FocusOut events just make us look for FocusIn events. They
|
are mostly ignored otherwise. */
|
||||||
are mostly ignored otherwise. */
|
{
|
||||||
XEvent fi;
|
XEvent fi;
|
||||||
if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
|
if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
|
||||||
event_process(&fi);
|
event_process(&fi);
|
||||||
/* dont unfocus the window we just focused! */
|
/* dont unfocus the window we just focused! */
|
||||||
if (fi.xfocus.window == e->xfocus.window)
|
if (fi.xfocus.window == e->xfocus.window)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (window == focus_backup && focus_client != NULL)
|
}
|
||||||
/* Something's focused but we got a focus event for the backup
|
|
||||||
window. this means that something unfocused before we received
|
|
||||||
the new FocusIn. Just ignore it. */
|
|
||||||
return;
|
|
||||||
break;
|
break;
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
|
|
|
@ -49,7 +49,7 @@ State ob_state;
|
||||||
gboolean ob_shutdown = FALSE;
|
gboolean ob_shutdown = FALSE;
|
||||||
gboolean ob_restart = FALSE;
|
gboolean ob_restart = FALSE;
|
||||||
char *ob_restart_path = NULL;
|
char *ob_restart_path = NULL;
|
||||||
gboolean ob_remote = FALSE;
|
gboolean ob_remote = TRUE;
|
||||||
gboolean ob_sync = FALSE;
|
gboolean ob_sync = FALSE;
|
||||||
Cursors ob_cursors;
|
Cursors ob_cursors;
|
||||||
char *ob_rc_path = NULL;
|
char *ob_rc_path = NULL;
|
||||||
|
|
Loading…
Reference in a new issue