]> code.delx.au - spectrwm/commitdiff
Always swap regions when using rg_move_next/rg_move_prev
authorYuri D'Elia <wavexx@thregr.org>
Sun, 1 May 2016 16:14:22 +0000 (18:14 +0200)
committerReginald Kennedy <rk@rejii.com>
Mon, 2 May 2016 17:20:27 +0000 (01:20 +0800)
Fixes interaction with the option workspace_clamp

spectrwm.c

index 75df3739cd425e1d4512028f9f1bccf8fb0a5afc..d3ea727f1ee003c5c2330e3b8888c54ea7bf2790 100644 (file)
@@ -4166,8 +4166,6 @@ switchws(struct binding *bp, struct swm_region *r, union arg *args)
        int                     wsid = args->id;
        bool                    unmap_old = false;
 
-       (void)bp;
-
        if (!(r && r->s))
                return;
 
@@ -4187,7 +4185,8 @@ switchws(struct binding *bp, struct swm_region *r, union arg *args)
                return;
 
        other_r = new_ws->r;
-       if (other_r && workspace_clamp) {
+       if (other_r && workspace_clamp &&
+           bp->action != FN_RG_MOVE_NEXT && bp->action != FN_RG_MOVE_PREV) {
                DNPRINTF(SWM_D_WS, "switchws: ws clamped.\n");
 
                if (warp_focus) {