aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-06-21 13:31:29 +1200
committerScott Anderson <ascent12@hotmail.com>2017-06-21 13:31:29 +1200
commit55854565dc80352e8aca122a76da21152e428995 (patch)
tree59832c9eb8e05545de00df590960a129fc171b86 /example
parent091de12bf4b91c9326c84a11ce10d51ca41fee0b (diff)
Fixed VT switching
Diffstat (limited to 'example')
-rw-r--r--example/simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/simple.c b/example/simple.c
index 16d8d460..34d9c9b1 100644
--- a/example/simple.c
+++ b/example/simple.c
@@ -42,7 +42,7 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
xkb_keysym_t sym, enum wlr_key_state key_state) {
if (sym == XKB_KEY_Escape) {
kbstate->compositor->exit = true;
- } else if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
+ } else if (key_state == WLR_KEY_PRESSED && sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
}
}