X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fcyclewindows.c;h=32d6a4535dfdd3a9a7f18394be17233f6cbfab07;hb=9cf5903e16c68ce1877d8d04ca6ee1c28e04a5ce;hp=059db93f9ccf3900b960e3e28ab1a9a7d1985413;hpb=ea371936cec5f1e7f0eaed698b2cff6fab42f210;p=chaz%2Fopenbox diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 059db93f..32d6a453 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -73,7 +73,7 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) m = parse_find_node("action", n->xmlChildrenNode); while (m) { ObActionsAct *action = actions_parse(i, doc, m); - if (action) o->actions = g_slist_prepend(o->actions, action); + if (action) o->actions = g_slist_append(o->actions, action); m = parse_find_node("action", m->next); } } @@ -134,7 +134,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) cycling = TRUE; stacking_restore(); - if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft)); + if (o->raise && ft) stacking_temp_raise(CLIENT_AS_WINDOW(ft)); return TRUE; } @@ -146,13 +146,13 @@ static gboolean i_input_func(guint initial_state, { if (e->type == KeyPress) { /* Escape cancels no matter what */ - if (e->xkey.keycode == ob_keycode(OB_KEY_ESCAPE)) { + if (ob_keycode_match(e->xkey.keycode, OB_KEY_ESCAPE)) { end_cycle(TRUE, e->xkey.state, options); return FALSE; } /* There were no modifiers and they pressed enter */ - else if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN) && + else if (ob_keycode_match(e->xkey.keycode, OB_KEY_RETURN) && !initial_state) { end_cycle(FALSE, e->xkey.state, options);