X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Faction.c;h=babb8f82adcc46a1f0f27f4b31078ca470400092;hb=9bd60fd92b8ff09630b35973947493a23015c621;hp=870e8f76ccd025fb3911b5a81b6167686e0f3ebe;hpb=bc1148f0b304dc74736d124696cdede969c3b739;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 870e8f76..babb8f82 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -234,7 +234,7 @@ void setup_action_send_to_desktop_down(ObAction **a, ObUserAction uact) void setup_action_desktop(ObAction **a, ObUserAction uact) { - (*a)->data.desktop.inter.any.interactive = TRUE; + (*a)->data.desktop.inter.any.interactive = FALSE; } void setup_action_desktop_prev(ObAction **a, ObUserAction uact) @@ -798,6 +798,13 @@ ActionString actionstrings[] = } }; +/* only key bindings can be interactive. thus saith the xor. + because of how the mouse is grabbed, mouse events dont even get + read during interactive events, so no dice! >:) */ +#define INTERACTIVE_LIMIT(a, uact) \ + if (uact != OB_USER_ACTION_KEYBOARD_KEY) \ + a->data.any.interactive = FALSE; + ObAction *action_from_string(const gchar *name, ObUserAction uact) { ObAction *a = NULL; @@ -810,11 +817,7 @@ ObAction *action_from_string(const gchar *name, ObUserAction uact) a = action_new(actionstrings[i].func); if (actionstrings[i].setup) actionstrings[i].setup(&a, uact); - /* only key bindings can be interactive. thus saith the xor. - because of how the mouse is grabbed, mouse events dont even get - read during interactive events, so no dice! >:) */ - if (uact != OB_USER_ACTION_KEYBOARD_KEY) - a->data.any.interactive = FALSE; + INTERACTIVE_LIMIT(a, uact); break; } if (!exist) @@ -889,6 +892,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, act->data.cycle.dialog = parse_bool(doc, n); } } + INTERACTIVE_LIMIT(act, uact); g_free(actname); } return act; @@ -945,7 +949,11 @@ void action_run_list(GSList *acts, ObClient *c, ObFrameContext context, keyboard_interactive_grab(state, a->data.any.c, a); } - ob_main_loop_queue_action(ob_main_loop, a); + /* closing interactive actions are not queued */ + if (!done) + ob_main_loop_queue_action(ob_main_loop, a); + else + a->func(&a->data); } } } @@ -1054,6 +1062,8 @@ void action_lower(union ActionData *data) client_action_start(data); stacking_lower(CLIENT_AS_WINDOW(data->client.any.c)); client_action_end(data); + + focus_order_to_bottom(data->client.any.c); } void action_close(union ActionData *data) @@ -1234,7 +1244,7 @@ void action_desktop(union ActionData *data) screen_set_desktop(first); } - if (data->inter.any.interactive && data->inter.final) { + if (!data->inter.any.interactive || data->inter.final) { screen_desktop_popup(0, FALSE); first = (unsigned) -1; }