make keybinds noninteractive when the last key in the chain has no modifiers (i think this is what the code was supposed to do but failed.)
don't reset key chains during an interactive action. reset them after an interactive action finishes (honoring chroot)
so you can <C-t><C-Up>Stuff<//> and it'll do stuff as you hit C-Up, you dont have to keep hitting C-t
on us */
event_halt_focus_delay();
on us */
event_halt_focus_delay();
focus_directional_cycle(data->interdiraction.direction,
data->interdiraction.dock_windows,
data->interdiraction.desktop_windows,
focus_directional_cycle(data->interdiraction.direction,
data->interdiraction.dock_windows,
data->interdiraction.desktop_windows,
static ObClient *first = NULL;
ObClient *ft = NULL;
static ObClient *first = NULL;
ObClient *ft = NULL;
- if (!interactive)
- return;
+ g_print("interactive %d dialog %d done %d cancel %d\n",
+ interactive, dialog, done, cancel);
if (cancel) {
focus_cycle_target = NULL;
goto done_cycle;
if (cancel) {
focus_cycle_target = NULL;
goto done_cycle;
+ } else if (done && interactive)
goto done_cycle;
if (!focus_order)
goto done_cycle;
if (!focus_order)
- if (ft) {
- if (ft != focus_cycle_target) {/* prevents flicker */
- focus_cycle_target = ft;
- focus_cycle_draw_indicator(ft);
- }
+ if (ft && ft != focus_cycle_target) {/* prevents flicker */
+ focus_cycle_target = ft;
+ if (!interactive)
+ goto done_cycle;
+ focus_cycle_draw_indicator(ft);
}
if (focus_cycle_target && dialog)
/* same arguments as focus_target_valid */
}
if (focus_cycle_target && dialog)
/* same arguments as focus_target_valid */
{
KeyBindingTree *tree, *t;
gboolean conflict;
{
KeyBindingTree *tree, *t;
gboolean conflict;
g_assert(keylist != NULL);
g_assert(action != NULL);
g_assert(keylist != NULL);
g_assert(action != NULL);
- /* find if every key in this chain has modifiers, and also find the
- bottom node of the tree */
- while (t->first_child) {
- if (!t->state)
- mods = FALSE;
- t = t->first_child;
- }
+ /* find the bottom node */
+ for (; t->first_child; t = t->first_child);
/* when there are no modifiers in the binding, then the action cannot
be interactive */
/* when there are no modifiers in the binding, then the action cannot
be interactive */
- if (!mods && action->data.any.interactive) {
+ if (!t->state && action->data.any.interactive) {
+ g_print("not interactive\n");
action->data.any.interactive = FALSE;
action->data.inter.final = TRUE;
}
action->data.any.interactive = FALSE;
action->data.inter.final = TRUE;
}
alist = g_slist_append(NULL, istate.action);
action_run_interactive(alist, istate.client, state, time, cancel, TRUE);
g_slist_free(alist);
alist = g_slist_append(NULL, istate.action);
action_run_interactive(alist, istate.client, state, time, cancel, TRUE);
g_slist_free(alist);
+
+ keyboard_reset_chains(0);
}
static void keyboard_interactive_end_client(ObClient *client, gpointer data)
}
static void keyboard_interactive_end_client(ObClient *client, gpointer data)
} else if (p->chroot) /* an empty chroot */
set_curpos(p);
else {
} else if (p->chroot) /* an empty chroot */
set_curpos(p);
else {
- keyboard_reset_chains(0);
+ GSList *it;
+ gboolean inter = FALSE;
+
+ for (it = p->actions; it && !inter; it = g_slist_next(it))
+ if (((ObAction*)it->data)->data.any.interactive)
+ inter = TRUE;
+ if (!inter) /* don't reset if the action is interactive */
+ keyboard_reset_chains(0);
action_run_key(p->actions, client, e->xkey.state,
e->xkey.x_root, e->xkey.y_root,
action_run_key(p->actions, client, e->xkey.state,
e->xkey.x_root, e->xkey.y_root,