about summary refs log tree commit diff
path: root/keyboard.h
diff options
context:
space:
mode:
authorMaarten van Gompel <proycon@anaproy.nl>2021-08-23 19:34:03 +0200
committerJohn Sullivan <jsullivan@csumb.edu>2021-10-19 23:12:01 -0700
commit099ab50fdadea974cb10ba6ae9441317565b2967 (patch)
tree5f157a9f1734aa9eec0eec9dd76c66f0adc23b42 /keyboard.h
parentc1636c927529140beb889a17f9c467be3b007be9 (diff)
downloadsuggpicker-099ab50fdadea974cb10ba6ae9441317565b2967.tar.gz
hide compose layer after unpress
Diffstat (limited to 'keyboard.h')
-rw-r--r--keyboard.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/keyboard.h b/keyboard.h
index f5fd555..79e4957 100644
--- a/keyboard.h
+++ b/keyboard.h
@@ -163,6 +163,12 @@ kbd_unpress_key(struct kbd *kb, uint32_t time) {
 										WL_KEYBOARD_KEY_STATE_RELEASED);
 		}
 		kb->last_press = NULL;
+
+		if (compose >= 2) {
+			compose = 0;
+			kb->layout = kb->prevlayout;
+			kbd_draw_layout(kb);
+		}
 	}
 }
 
@@ -232,12 +238,6 @@ kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) {
 		break;
 	}
 
-	if (compose == 3) {
-		compose = 0;
-		kb->layout = kb->prevlayout;
-		kbd_draw_layout(kb);
-	}
-
 	kb->surf->dirty = true;
 }