diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-22 14:24:23 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-22 14:24:23 +0000 |
| commit | a07465f376b0a33270532501127ec812efe2c2b2 (patch) | |
| tree | 43af75958d6e3f7b9a7e36c1ece9cd3e09d2302c /openbox/actions | |
| parent | 6c5f6ed1f5d501c79977a55c0f2430ebdd32ef6c (diff) | |
add raise action
Diffstat (limited to 'openbox/actions')
| -rw-r--r-- | openbox/actions/all.c | 1 | ||||
| -rw-r--r-- | openbox/actions/all.h | 1 | ||||
| -rw-r--r-- | openbox/actions/focus.c | 7 | ||||
| -rw-r--r-- | openbox/actions/raise.c | 24 |
4 files changed, 29 insertions, 4 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c index 71e439e6..4bc4814a 100644 --- a/openbox/actions/all.c +++ b/openbox/actions/all.c @@ -14,4 +14,5 @@ void action_all_startup() action_close_startup(); action_move_startup(); action_focus_startup(); + action_raise_startup(); } diff --git a/openbox/actions/all.h b/openbox/actions/all.h index 2f2cf18a..01716e39 100644 --- a/openbox/actions/all.h +++ b/openbox/actions/all.h @@ -15,5 +15,6 @@ void action_breakchroot_startup(); void action_close_startup(); void action_move_startup(); void action_focus_startup(); +void action_raise_startup(); #endif diff --git a/openbox/actions/focus.c b/openbox/actions/focus.c index 9be6741c..254850ec 100644 --- a/openbox/actions/focus.c +++ b/openbox/actions/focus.c @@ -51,10 +51,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) { client_activate(data->client, o->here, FALSE, FALSE, TRUE); } - } else { - /* focus action on something other than a client, make keybindings - work for this openbox instance, but don't focus any specific client - */ + } else if (data->context == OB_FRAME_CONTEXT_DESKTOP) { + /* focus action on the root window. make keybindings work for this + openbox instance, but don't focus any specific client */ focus_nothing(); } diff --git a/openbox/actions/raise.c b/openbox/actions/raise.c new file mode 100644 index 00000000..916c27b5 --- /dev/null +++ b/openbox/actions/raise.c @@ -0,0 +1,24 @@ +#include "openbox/actions.h" +#include "openbox/stacking.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_raise_startup() +{ + actions_register("Raise", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + if (data->client) { + actions_client_move(data, TRUE); + stacking_raise(CLIENT_AS_WINDOW(data->client)); + actions_client_move(data, FALSE); + } + + return FALSE; +} |
