From: Dana Jansens Date: Sun, 13 May 2007 03:21:18 +0000 (+0000) Subject: merge r6421-6427 from trunk X-Git-Tag: openbox-3_3_991-RELEASE~60 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=1ecba632ecf273646569ff479e2817a392c4aea2;p=dana%2Fopenbox.git merge r6421-6427 from trunk --- diff --git a/Makefile.am b/Makefile.am index 373f78b3..f815b97e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -410,7 +410,9 @@ dist_noinst_DATA = \ dist_doc_DATA = \ COMPLIANCE \ README \ - AUTHORS + AUTHORS \ + data/rc.xsd \ + data/menu.xsd EXTRA_DIST = \ config.rpath \ diff --git a/openbox/action.c b/openbox/action.c index 931cff39..0f1a04d2 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -48,8 +48,21 @@ inline void client_action_start(union ActionData *data) inline void client_action_end(union ActionData *data) { if (config_focus_follow) - if (data->any.context != OB_FRAME_CONTEXT_CLIENT && !data->any.button) - grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); + if (data->any.context != OB_FRAME_CONTEXT_CLIENT) { + if (!data->any.button) { + grab_pointer(FALSE, FALSE, OB_CURSOR_NONE); + } else { + ObClient *c; + + /* usually this is sorta redundant, but with a press action + that moves windows our from under the cursor, the enter + event will come as a GrabNotify which is ignored, so this + makes a fake enter event + */ + if ((c = client_under_pointer())) + event_enter_client(c); + } + } } typedef struct @@ -1255,7 +1268,8 @@ void action_activate(union ActionData *data) { if (data->client.any.c) { if (!data->any.button || client_mouse_focusable(data->client.any.c) || - data->any.context != OB_FRAME_CONTEXT_CLIENT) + (data->any.context != OB_FRAME_CONTEXT_CLIENT && + data->any.context != OB_FRAME_CONTEXT_FRAME)) { /* if using focus_delay, stop the timer now so that focus doesn't go moving on us */ @@ -1275,7 +1289,8 @@ void action_focus(union ActionData *data) { if (data->client.any.c) { if (!data->any.button || client_mouse_focusable(data->client.any.c) || - data->any.context != OB_FRAME_CONTEXT_CLIENT) + (data->any.context != OB_FRAME_CONTEXT_CLIENT && + data->any.context != OB_FRAME_CONTEXT_FRAME)) { /* if using focus_delay, stop the timer now so that focus doesn't go moving on us */ diff --git a/openbox/focus.c b/openbox/focus.c index 2c66336d..4aeeab5b 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -594,6 +594,7 @@ static gboolean valid_focus_target(ObClient *ft, /* it's not set to skip the taskbar (unless it is a type that would be expected to set this hint */ ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK || + ft->type == OB_CLIENT_TYPE_DESKTOP || ft->type == OB_CLIENT_TYPE_TOOLBAR || ft->type == OB_CLIENT_TYPE_MENU || ft->type == OB_CLIENT_TYPE_UTILITY) || diff --git a/openbox/frame.c b/openbox/frame.c index 86b2258b..44fea5bc 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -48,17 +48,6 @@ #define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \ f->cbwidth_y) -/* the offsets for the titlebar elements from the edge of the titlebar. - negative means from the right edge. */ -gint icon_off; -gint label_off; -gint iconify_off; -gint desk_off; -gint shade_off; -gint max_off; -gint close_off; - - static void flash_done(gpointer data); static gboolean flash_timeout(gpointer data); diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 84ae2a38..d758b386 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -221,7 +221,7 @@ gboolean keyboard_interactive_grab(guint state, ObClient *client, if (!grab_keyboard(TRUE)) return FALSE; } else if (action->func != istate.action->func) { - keyboard_interactive_end(state, FALSE, action->data.any.time, FALSE); + keyboard_interactive_end(state, TRUE, action->data.any.time, FALSE); } istate.active = TRUE; diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 367ed1c4..b3938a4b 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -971,6 +971,9 @@ static gboolean menu_frame_show(ObMenuFrame *self) if (menu_frame_visible == NULL) { /* no menus shown yet */ + + /* grab the pointer in such a way as to pass through "owner events" + so that we can get enter/leave notifies in the menu. */ if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER)) return FALSE; if (!grab_keyboard(TRUE)) {