aboutsummaryrefslogtreecommitdiff
path: root/example/simple.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-06-21 12:47:53 +1200
committerScott Anderson <ascent12@hotmail.com>2017-06-21 12:47:53 +1200
commit091de12bf4b91c9326c84a11ce10d51ca41fee0b (patch)
tree63cd89ce401a8ff8e8ca18f258f663625725b85e /example/simple.c
parentd1493b23918f5558a0f6a24c9a7a2bb34207a6ed (diff)
Changed session signal to only emit on DRM changes
Diffstat (limited to 'example/simple.c')
-rw-r--r--example/simple.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/example/simple.c b/example/simple.c
index f3a66db9..16d8d460 100644
--- a/example/simple.c
+++ b/example/simple.c
@@ -42,6 +42,8 @@ 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) {
+ wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
}
}