X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Factions%2Fcyclewindows.c;h=555417e23724a93c593c0f80e2c52d188c865810;hb=e5aee030e5d6a0234820f849a4248ea797c2115f;hp=3f7388ec061c2ae24ed45bf2a34fec2cf145dcb9;hpb=f227bd994d21d901790d93a962915863914b6c09;p=chaz%2Fopenbox diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 3f7388ec..555417e2 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -14,6 +14,8 @@ typedef struct { GSList *actions; } Options; +static gboolean cycling = FALSE; + static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); static void free_func(gpointer options); static gboolean run_func(ObActionsData *data, gpointer options); @@ -56,7 +58,7 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) if ((n = parse_find_node("allDesktops", node))) o->all_desktops = parse_bool(doc, n); - if ((n = parse_find_node("actions", node))) { + if ((n = parse_find_node("finalactions", node))) { xmlNodePtr m; m = parse_find_node("action", n->xmlChildrenNode); @@ -92,6 +94,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) TRUE, o->dialog, FALSE, FALSE); + cycling = TRUE; return TRUE; } @@ -129,7 +132,10 @@ static gboolean i_input_func(guint initial_state, static void i_cancel_func(gpointer options) { - end_cycle(TRUE, 0, options); + /* we get cancelled when we move focus, but we're not cycling anymore, so + just ignore that */ + if (cycling) + end_cycle(TRUE, 0, options); } static void end_cycle(gboolean cancel, guint state, Options *o) @@ -149,4 +155,5 @@ static void end_cycle(gboolean cancel, guint state, Options *o) actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY, state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft); } + cycling = FALSE; }