diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-03 18:39:14 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-11-15 22:26:43 +0100 |
commit | 7623292734d6ba48bbfef1c32da28d02118dac38 (patch) | |
tree | d19927d826274e53271613758380aae620ba5dfc /sway/input/keyboard.c | |
parent | ipc: add view content type (diff) | |
download | sway-7623292734d6ba48bbfef1c32da28d02118dac38.tar.gz sway-7623292734d6ba48bbfef1c32da28d02118dac38.tar.zst sway-7623292734d6ba48bbfef1c32da28d02118dac38.zip |
Update for wlroots!3814
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3814
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 5e5692f1..0b90b6af 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -264,13 +264,9 @@ static bool keyboard_execute_compositor_binding(struct sway_keyboard *keyboard, | |||
264 | xkb_keysym_t keysym = pressed_keysyms[i]; | 264 | xkb_keysym_t keysym = pressed_keysyms[i]; |
265 | if (keysym >= XKB_KEY_XF86Switch_VT_1 && | 265 | if (keysym >= XKB_KEY_XF86Switch_VT_1 && |
266 | keysym <= XKB_KEY_XF86Switch_VT_12) { | 266 | keysym <= XKB_KEY_XF86Switch_VT_12) { |
267 | if (wlr_backend_is_multi(server.backend)) { | 267 | if (server.session) { |
268 | struct wlr_session *session = | 268 | unsigned vt = keysym - XKB_KEY_XF86Switch_VT_1 + 1; |
269 | wlr_backend_get_session(server.backend); | 269 | wlr_session_change_vt(server.session, vt); |
270 | if (session) { | ||
271 | unsigned vt = keysym - XKB_KEY_XF86Switch_VT_1 + 1; | ||
272 | wlr_session_change_vt(session, vt); | ||
273 | } | ||
274 | } | 270 | } |
275 | return true; | 271 | return true; |
276 | } | 272 | } |