summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-12 19:40:55 -0500
committerJune McEnroe <june@causal.agency>2020-02-12 19:40:55 -0500
commit4198f67aa2149088cd49ad43f09a53b5c3276846 (patch)
treea890a491b71582e890d09e3464d6c9a577989095
parentHide debug prompt if buffer starts with / (diff)
downloadcatgirl-4198f67aa2149088cd49ad43f09a53b5c3276846.tar.gz
catgirl-4198f67aa2149088cd49ad43f09a53b5c3276846.zip
Mark and unmark on uiHide, uiShow
-rw-r--r--ui.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/ui.c b/ui.c
index b91cb3d..97f81b3 100644
--- a/ui.c
+++ b/ui.c
@@ -300,21 +300,6 @@ void uiDraw(void) {
 	fflush(stdout);
 }
 
-void uiShow(void) {
-	prevTitle[0] = '\0';
-	putp(EnterFocusMode);
-	putp(EnterPasteMode);
-	fflush(stdout);
-	hidden = false;
-}
-
-void uiHide(void) {
-	hidden = true;
-	putp(ExitFocusMode);
-	putp(ExitPasteMode);
-	endwin();
-}
-
 struct Style {
 	attr_t attr;
 	enum Color fg, bg;
@@ -450,6 +435,23 @@ static void unmark(struct Window *window) {
 	statusUpdate();
 }
 
+void uiShow(void) {
+	prevTitle[0] = '\0';
+	putp(EnterFocusMode);
+	putp(EnterPasteMode);
+	fflush(stdout);
+	hidden = false;
+	unmark(windows.active);
+}
+
+void uiHide(void) {
+	mark(windows.active);
+	hidden = true;
+	putp(ExitFocusMode);
+	putp(ExitPasteMode);
+	endwin();
+}
+
 static void windowScroll(struct Window *window, int n) {
 	mark(window);
 	window->scroll += n;
a href='/torus/commit/README?id=038957c275278559d6e3f814e9b06e9349e80738&follow=1'>Add merge.c to READMEJune McEnroe 2017-09-03Assert client coords are valid after movementJune McEnroe 2017-09-03Relicense AGPLJune McEnroe 2017-09-01Revert "Add client readOnly mode"June McEnroe 2017-09-01Remove clientRemove call from clientCastJune McEnroe 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe 2017-08-31Choose B for tiles with equal modify timesJune McEnroe 2017-08-31Add quick data file merge toolJune McEnroe 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe