aboutsummaryrefslogtreecommitdiff
path: root/dminiwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2011-12-06 03:26:06 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2011-12-06 03:26:06 +0200
commit55d98c9448161827b6a8ffbd003fe5e580a91981 (patch)
treea64f5d125a8453a8eba49fc061830634597c12c3 /dminiwm.c
parentb7286fc34177501fe7ec58dfe3878588b515929c (diff)
use DESKTOPS, don't calculate desktops length; pass the arguments in one go
Diffstat (limited to 'dminiwm.c')
-rw-r--r--dminiwm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dminiwm.c b/dminiwm.c
index abb5677..48e54a5 100644
--- a/dminiwm.c
+++ b/dminiwm.c
@@ -376,14 +376,11 @@ void change_desktop(const Arg arg) {
}
void last_desktop(const Arg arg) {
- Arg a = {.i = previous_desktop};
- change_desktop(a);
+ change_desktop((Arg){.i = previous_desktop});
}
void rotate_desktop(const Arg arg) {
- int ndesktops = TABLENGTH(desktops);
- Arg a = {.i = (current_desktop + ndesktops + arg.i) % ndesktops};
- change_desktop(a);
+ change_desktop((Arg){.i = (current_desktop + DESKTOPS + arg.i) % DESKTOPS});
}
void client_to_desktop(const Arg arg) {