a = action_new(actionstrings[i].func, uact);
if (actionstrings[i].setup)
actionstrings[i].setup(&a, uact);
+ /* only key bindings can be interactive. thus saith the xor. */
+ if (uact != OB_USER_ACTION_KEYBOARD_KEY)
+ a->data.any.interactive = FALSE;
break;
}
if (!exist)
}
void action_run_full(ObAction *a, struct _ObClient *c,
- ObFrameContext context,
guint state, guint button, gint x, gint y,
gboolean cancel, gboolean done)
{
a->data.inter.cancel = cancel;
a->data.inter.final = done;
if (!(cancel || done))
- keyboard_interactive_grab(state, c, context, a);
+ keyboard_interactive_grab(state, c, a);
}
a->func(&a->data);
void action_unshaderaise(union ActionData *data)
{
if (data->client.any.c) {
- if (data->client.any.c->shaded)
+ if (data->client.any.c->shaded) {
+ grab_pointer(TRUE, OB_CURSOR_NONE);
client_shade(data->client.any.c, FALSE);
- else
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ } else
stacking_raise(CLIENT_AS_WINDOW(data->client.any.c));
}
}
if (data->client.any.c) {
if (data->client.any.c->shaded)
stacking_lower(CLIENT_AS_WINDOW(data->client.any.c));
- else
+ else {
+ grab_pointer(TRUE, OB_CURSOR_NONE);
client_shade(data->client.any.c, TRUE);
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ }
}
}
void action_shade(union ActionData *data)
{
- if (data->client.any.c)
+ if (data->client.any.c) {
+ grab_pointer(TRUE, OB_CURSOR_NONE);
client_shade(data->client.any.c, TRUE);
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ }
}
void action_unshade(union ActionData *data)
{
- if (data->client.any.c)
+ if (data->client.any.c) {
+ grab_pointer(TRUE, OB_CURSOR_NONE);
client_shade(data->client.any.c, FALSE);
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ }
}
void action_toggle_shade(union ActionData *data)
{
- if (data->client.any.c)
+ if (data->client.any.c) {
+ grab_pointer(TRUE, OB_CURSOR_NONE);
client_shade(data->client.any.c, !data->client.any.c->shaded);
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ }
}
void action_toggle_omnipresent(union ActionData *data)