diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-22 02:12:32 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-22 02:12:32 +0000 |
| commit | a5caab959cc5d99ed570d7346fd022e32900c103 (patch) | |
| tree | 4541de3f59ba0fc2d64facb9f270d2860cda24e9 /openbox/event.c | |
| parent | 05d1a86efff83851018ebf58a1f14035fa725d02 (diff) | |
ignore crossing events while an interactive grab is going on.
when a menu is open, use the crossing events for the menu only.
Diffstat (limited to 'openbox/event.c')
| -rw-r--r-- | openbox/event.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/openbox/event.c b/openbox/event.c index 7c85e842..1f5bae13 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -387,9 +387,7 @@ static gboolean event_ignore(XEvent *e, ObClient *client) switch(e->type) { case EnterNotify: case LeaveNotify: - if (e->xcrossing.detail == NotifyInferior) - return TRUE; - break; + return keyboard_interactively_grabbed(); case FocusIn: case FocusOut: /* I don't think this should ever happen with our event masks, but @@ -473,7 +471,13 @@ static void event_process(const XEvent *ec, gpointer data) ed->ignored = FALSE; /* deal with it in the kernel */ - if (group) + + if (menu_frame_visible && + (e->type == EnterNotify || e->type == LeaveNotify)) + { + /* crossing events for menu */ + event_handle_menu(e); + } else if (group) event_handle_group(group, e); else if (client) event_handle_client(client, e); @@ -506,11 +510,6 @@ static void event_process(const XEvent *ec, gpointer data) xerror_set_ignore(FALSE); } - /* crossing events for menu */ - if (e->type == EnterNotify || e->type == LeaveNotify) - if (menu_frame_visible) - event_handle_menu(e); - /* user input (action-bound) events */ if (e->type == ButtonPress || e->type == ButtonRelease || e->type == MotionNotify || e->type == KeyPress || |
