X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Faction.c;h=39da39a5b7842ec4159545abd1f3ddf9ad7f7ef5;hb=a38012f2fff30aa48913c5020e72f537c742542f;hp=081b68f5293b921d91f1ba94f138cf21dc1fb5af;hpb=c83832887bd6ca51fa9e04d91dab086c1bcb4229;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 081b68f5..39da39a5 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -47,17 +47,18 @@ static void client_action_end(union ActionData *data) { if (config_focus_follow) if (data->any.context != OB_FRAME_CONTEXT_CLIENT) { - if (!data->any.button && data->any.c) + if (!data->any.button && data->any.c) { event_ignore_all_queued_enters(); - else { - /* we USED to create a fake enter event here, so that when you - used a Press context, and the button was still down, - you could still get enter events that weren't - NotifyWhileGrabbed. - - only problem with this is that then the resulting focus - change events can ALSO be NotifyWhileGrabbed. And that is - bad. So, don't create fake enter events anymore. */ + } 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); } } } @@ -1215,11 +1216,9 @@ void action_execute(union ActionData *data) if (data->execute.path) { cmd = g_filename_from_utf8(data->execute.path, -1, NULL, NULL, NULL); if (cmd) { - /* If there is an interactive action going on, then cancel it - to release the keyboard, so that the run application - can grab the keyboard if it wants to. */ - if (keyboard_interactively_grabbed()) - keyboard_interactive_cancel(); + /* If there is a keyboard grab going on then we need to cancel + it so the application can grab things */ + event_cancel_all_key_grabs(); if (!g_shell_parse_argv (cmd, NULL, &argv, &e)) { g_message(_("Failed to execute '%s': %s"), @@ -1588,7 +1587,7 @@ void action_send_to_desktop(union ActionData *data) data->sendto.desk == DESKTOP_ALL) { client_set_desktop(c, data->sendto.desk, data->sendto.follow); if (data->sendto.follow && data->sendto.desk != screen_desktop) - screen_set_desktop(data->sendto.desk, c != focus_client); + screen_set_desktop(data->sendto.desk, TRUE); } } @@ -1601,7 +1600,7 @@ void action_desktop(union ActionData *data) { screen_set_desktop(data->desktop.desk, TRUE); if (data->inter.any.interactive) - screen_desktop_popup(data->desktop.desk, focus_client->desktop != DESKTOP_ALL); + screen_desktop_popup(data->desktop.desk, TRUE); } } @@ -1621,7 +1620,8 @@ void action_desktop_dir(union ActionData *data) if (!data->sendtodir.inter.any.interactive || (data->sendtodir.inter.final && !data->sendtodir.inter.cancel)) { - if (d != screen_desktop) screen_set_desktop(d, focus_client->desktop != DESKTOP_ALL); + if (d != screen_desktop) + screen_set_desktop(d, TRUE); } } @@ -1645,7 +1645,7 @@ void action_send_to_desktop_dir(union ActionData *data) { client_set_desktop(c, d, data->sendtodir.follow); if (data->sendtodir.follow && d != screen_desktop) - screen_set_desktop(d, c != focus_client); + screen_set_desktop(d, TRUE); } }