X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=ad146b4796edcae9eb85a432267c2dff07ccb83c;hb=47529e777f5d0ac222b6ed06c9644c3909bd6479;hp=154b83479df7cfa434ae15dae9984e98a2a7f862;hpb=6e06e45fb63f0d80878a5102814de4d966345a15;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 154b8347..ad146b47 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -531,7 +531,7 @@ static void event_process(const XEvent *ec, gpointer data) */ if (!focus_left_screen) - focus_fallback(TRUE, FALSE); + focus_fallback(FALSE, FALSE); } } else if (!client) @@ -823,6 +823,10 @@ static void event_handle_client(ObClient *client, XEvent *e) } break; case MotionNotify: + /* when there is a grab on the pointer, we won't get enter/leave + notifies, but we still get motion events */ + if (grab_on_pointer()) break; + con = frame_context(client, e->xmotion.window, e->xmotion.x, e->xmotion.y); switch (con) { @@ -1509,7 +1513,9 @@ static void event_handle_dock(ObDock *s, XEvent *e) dock_hide(FALSE); break; case LeaveNotify: - dock_hide(TRUE); + /* don't hide when moving into a dock app */ + if (e->xcrossing.detail != NotifyInferior) + dock_hide(TRUE); break; } } @@ -1578,13 +1584,8 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) if (frame == NULL) ret = FALSE; - else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) { - /* Escape goes to the parent menu or closes the last one */ - if (frame->parent) - menu_frame_select(frame, NULL, TRUE); - else - menu_frame_hide_all(); - } + else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) + menu_frame_hide_all(); else if (keycode == ob_keycode(OB_KEY_RETURN) && (state == 0 || state == ControlMask))