X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=4839088c710ffc25e20606f40efd4656fff3e62c;hb=7869b81d4601b4ee04296d8139f2665c33b3a3d2;hp=f8b2b7b3845175971043169876bd2b57fbcf7f63;hpb=97821223393cdebd3eb3fdfcc6d0dcf7502a62d7;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index f8b2b7b3..4839088c 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1199,10 +1199,9 @@ void action_execute(union ActionData *data) void action_activate(union ActionData *data) { if (data->client.any.c) { - /* similar to the openbox dock for dockapps, don't let user actions - give focus to 3rd-party docks (panels) either (unless they ask for - it themselves). */ - if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) { + if (!data->any.button || client_mouse_focusable(data->client.any.c) || + data->any.context != OB_FRAME_CONTEXT_CLIENT) + { /* if using focus_delay, stop the timer now so that focus doesn't go moving on us */ event_halt_focus_delay(); @@ -1220,10 +1219,9 @@ void action_activate(union ActionData *data) void action_focus(union ActionData *data) { if (data->client.any.c) { - /* similar to the openbox dock for dockapps, don't let user actions - give focus to 3rd-party docks (panels) either (unless they ask for - it themselves). */ - if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) { + if (!data->any.button || client_mouse_focusable(data->client.any.c) || + data->any.context != OB_FRAME_CONTEXT_CLIENT) + { /* if using focus_delay, stop the timer now so that focus doesn't go moving on us */ event_halt_focus_delay();