diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-15 06:12:07 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-15 06:12:07 +0000 |
| commit | 5e27544d073856731363c1be9b132074e13259f6 (patch) | |
| tree | f0ff8b988fadce426ab2ce7db55a5ebabe62e1e6 | |
| parent | 0855269035e17a1c4702d3cae85c98f46af66191 (diff) | |
sloppy focus fixes, ignore a few more enter events
| -rw-r--r-- | openbox/event.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/openbox/event.c b/openbox/event.c index e2851809..409641df 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -394,11 +394,14 @@ static gboolean event_ignore(XEvent *e, ObClient *client) case LeaveNotify: /* NotifyUngrab occurs when a mouse button is released and the event is caused, like when lowering a window */ - /* NotifyVirtual occurs when ungrabbing the pointer */ + /* NotifyVirtual and NotifyAncestor occurs when ungrabbing the + pointer (Ancestor happens when the pointer is on a window border) */ if (e->xcrossing.mode == NotifyGrab || e->xcrossing.detail == NotifyInferior || (e->xcrossing.mode == NotifyUngrab && - e->xcrossing.detail == NotifyVirtual)) { + (e->xcrossing.detail == NotifyAncestor || + e->xcrossing.detail == NotifyNonlinearVirtual || + e->xcrossing.detail == NotifyVirtual))) { #ifdef DEBUG_FOCUS ob_debug("%sNotify mode %d detail %d on %lx IGNORED\n", (e->type == EnterNotify ? "Enter" : "Leave"), @@ -698,15 +701,7 @@ static void event_handle_client(ObClient *client, XEvent *e) break; case OB_FRAME_CONTEXT_FRAME: if (client_normal(client)) { - if (ob_state() == OB_STATE_STARTING) { - /* move it to the top of the focus order */ - guint desktop = client->desktop; - if (desktop == DESKTOP_ALL) desktop = screen_desktop; - focus_order[desktop] = g_list_remove(focus_order[desktop], - client); - focus_order[desktop] = g_list_prepend(focus_order[desktop], - client); - } else if (config_focus_follow) { + if (config_focus_follow) { #ifdef DEBUG_FOCUS ob_debug("EnterNotify on %lx, focusing window\n", client->window); |
