aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-28 20:41:03 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-28 20:41:12 +0300
commitf83d814ddfef0858a49baf38158e257723fb13e2 (patch)
tree7a32f3d06110d1ed52141d677901e9208700b456
parent8752aedfa608386f3472999b204d3abcb6335af8 (diff)
no need to re-assign values on selectdesktop if the new index is the current
-rw-r--r--monsterwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 5a3f602..4865dbd 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -724,7 +724,7 @@ void run(void) {
/* save the current desktop's properties
* load the specified desktop's properties */
void selectdesktop(int i) {
- if (i < 0 || i >= DESKTOPS) return;
+ if (i < 0 || i >= DESKTOPS || i == currdeskidx) return;
desktops[currdeskidx] = (Desktop){ .mode = mode, .head = head, .curr = curr, .prev = prev, };
mode = desktops[i].mode;
head = desktops[i].head;