(*a)->data.addremovedesktop.current = FALSE;
}
-void setup_action_focus(ObAction **a, ObUserAction uact)
-{
- (*a)->data.any.client_action = OB_CLIENT_ACTION_OPTIONAL;
-}
-
void setup_client_action(ObAction **a, ObUserAction uact)
{
(*a)->data.any.client_action = OB_CLIENT_ACTION_ALWAYS;
action_directional_focus,
setup_action_directional_focus_northwest
},
- {
- "focus",
- action_focus,
- setup_action_focus
- },
{
"unfocus",
action_unfocus,
action_growtoedge,
setup_action_growtoedge_east
},
- {
- "breakchroot",
- action_break_chroot,
- NULL
- },
{
"adddesktoplast",
action_add_desktop,
action_run(l, c, 0, time);
}
-void action_focus(union ActionData *data)
-{
- if (data->client.any.c) {
- if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
- (data->any.context != OB_FRAME_CONTEXT_CLIENT &&
- data->any.context != OB_FRAME_CONTEXT_FRAME))
- {
- /* if using focus_delay, stop the timer now so that focus doesn't
- go moving on us */
- event_halt_focus_delay();
-
- client_focus(data->client.any.c);
- }
- } else {
- /* focus action on something other than a client, make keybindings
- work for this openbox instance, but don't focus any specific client
- */
- focus_nothing();
- }
-}
-
void action_unfocus (union ActionData *data)
{
if (data->client.any.c == focus_client)
dock_configure();
}
-void action_break_chroot(union ActionData *data)
-{
- /* break out of one chroot */
- keyboard_reset_chains(1);
-}
-
void action_add_desktop(union ActionData *data)
{
client_action_start(data);
data->context != OB_FRAME_CONTEXT_CLIENT ||
data->context != OB_FRAME_CONTEXT_FRAME)
{
- /* if using focus_delay, stop the timer now so that focus doesn't
- go moving on us */
- event_halt_focus_delay();
-
client_activate(data->client, o->here, o->raise, o->unshade, TRUE);
}
} else {
--- /dev/null
+#include "openbox/actions.h"
+#include "openbox/keyboard.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_breakchroot_startup()
+{
+ actions_register("BreakChroot",
+ NULL, NULL,
+ run_func,
+ NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+ /* break out of one chroot */
+ keyboard_reset_chains(1);
+
+ return FALSE;
+}