summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-29 23:24:58 -0500
committerJune McEnroe <june@causal.agency>2021-01-29 23:24:58 -0500
commit89a2fac05ad5cef1842f6d8cee8351ffd17c7095 (patch)
tree812d31c146b4dcd1b673e43302f47d5c9bb13c40
parentAdd Repology links to README (diff)
downloadcatgirl-89a2fac05ad5cef1842f6d8cee8351ffd17c7095.tar.gz
catgirl-89a2fac05ad5cef1842f6d8cee8351ffd17c7095.zip
Only skip setting swap in windowShow
With the early return, mainUpdate doesn't get called in cases where
other functions expect windowShow to call it, such as when closing
or moving windows.
-rw-r--r--ui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui.c b/ui.c
index 23312ed..c2c848f 100644
--- a/ui.c
+++ b/ui.c
@@ -770,10 +770,11 @@ static void inputUpdate(void) {
 }
 
 static void windowShow(uint num) {
-	windows.user = num;
-	if (windows.show == num) return;
-	windows.swap = windows.show;
+	if (num != windows.show) {
+		windows.swap = windows.show;
+	}
 	windows.show = num;
+	windows.user = num;
 	mark(windows.ptrs[windows.swap]);
 	unmark(windows.ptrs[windows.show]);
 	mainUpdate();
id=1732cd75cf6353ecbd2da04f8bcc326ac9e4fcfb&follow=1'>Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe