X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Factions.c;h=023fab3ab5c96291ce0508c4527bc035cdfd0c07;hb=0cd6f4e43c355ef6b568c769a4ecb2983d5f3fa6;hp=fda119c825008aa533c357b310fabc69b767a75c;hpb=1b392b5fbe85c55cda2b0fc9d1e10cbe56216185;p=chaz%2Fopenbox diff --git a/openbox/actions.c b/openbox/actions.c index fda119c8..023fab3a 100644 --- a/openbox/actions.c +++ b/openbox/actions.c @@ -208,7 +208,7 @@ ObActionsAct* actions_parse(xmlNodePtr node) gchar *name; ObActionsAct *act = NULL; - if (obt_parse_attr_string(node, "name", &name)) { + if (obt_xml_attr_string(node, "name", &name)) { if ((act = actions_build_act_from_string(name))) { /* there is more stuff to parse here */ if (act->def->canbeinteractive) { @@ -304,9 +304,12 @@ void actions_run_acts(GSList *acts, if (interactive_act) actions_interactive_cancel_act(); if (act->i_pre) - act->i_pre(act->options); - ok = actions_interactive_begin_act(act, state); + if (!act->i_pre(state, act->options)) + act->i_input = NULL; /* remove the interactivity */ } + /* check again cuz it might have been cancelled */ + if (actions_act_is_interactive(act)) + ok = actions_interactive_begin_act(act, state); } /* fire the action's run function with this data */ @@ -405,13 +408,19 @@ void actions_client_move(ObActionsData *data, gboolean start) are ignored during a grab, so don't force fake ones when they should be ignored */ - if ((c = client_under_pointer()) && c != data->client && - !grab_on_pointer()) - { - ob_debug_type(OB_DEBUG_FOCUS, - "Generating fake enter because we did a " - "mouse-event action"); - event_enter_client(c); + if (!grab_on_pointer()) { + if ((c = client_under_pointer()) && c != data->client) { + ob_debug_type(OB_DEBUG_FOCUS, + "Generating fake enter because we did a " + "mouse-event action"); + event_enter_client(c); + } + else if (!c && c != data->client) { + ob_debug_type(OB_DEBUG_FOCUS, + "Generating fake leave because we did a " + "mouse-event action"); + event_enter_client(data->client); + } } } else if (!data->button && !config_focus_under_mouse)