all repos — openbox @ a5caab959cc5d99ed570d7346fd022e32900c103

openbox fork - make it a bit more like ryudo

ignore crossing events while an interactive grab is going on.
when a menu is open, use the crossing events for the menu only.
Dana Jansens danakj@orodu.net
commit

a5caab959cc5d99ed570d7346fd022e32900c103

parent

05d1a86efff83851018ebf58a1f14035fa725d02

2 files changed, 9 insertions(+), 10 deletions(-)

jump to
M openbox/event.copenbox/event.c

@@ -387,9 +387,7 @@ {

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 @@ } else if (ed)

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);

@@ -505,11 +509,6 @@ XConfigureWindow(ob_display, window,

e->xconfigurerequest.value_mask, &xwc); 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 ||
M openbox/grab.copenbox/grab.c

@@ -72,7 +72,7 @@

if (grab) { if (kgrabs++ == 0) { ret = XGrabKeyboard(ob_display, RootWindow(ob_display, ob_screen), - FALSE, GrabModeAsync, GrabModeAsync, + False, GrabModeAsync, GrabModeAsync, event_curtime) == Success; if (!ret) --kgrabs;