diff --git a/src/switch-wm.scm b/src/switch-wm.scm index 050daee..7ff1634 100644 --- a/src/switch-wm.scm +++ b/src/switch-wm.scm @@ -155,8 +155,8 @@ (if titlebar (set-titlebar-title! titlebar name))))) - ((select-next) (select-next-client wm (second msg))) - ((select-previous) (select-previous-client wm (second msg))) + ((select-next) (select-next-client wm data (second msg))) + ((select-previous) (select-previous-client wm data (second msg))) ((swap-next) (swap-titlebar-with-next wm data (second msg))) ((swap-previous) (swap-titlebar-with-previous wm data (second msg))) @@ -351,11 +351,11 @@ (wm-select-client wm (cadr l) time)) (loop (cdr l))))))) -(define (select-next-client wm time) - (select-next-client* wm (wm-clients wm) time)) +(define (select-next-client wm data time) + (select-next-client* wm (map car (data:titlebars data)) time)) -(define (select-previous-client wm time) - (select-next-client* wm (reverse (wm-clients wm)) time)) +(define (select-previous-client wm data time) + (select-next-client* wm (reverse (map car (data:titlebars data))) time)) ;; ***