From f83d814ddfef0858a49baf38158e257723fb13e2 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Thu, 28 Jun 2012 20:41:03 +0300 Subject: no need to re-assign values on selectdesktop if the new index is the current --- monsterwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monsterwm.c') 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; -- cgit v1.3.1