mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
seat.c: Make clangformat happy and simplify the control flow
This restores the original behaviour from 2cf40f7, is easier to read,
and satisfies clangformat.
This also doesn't call wlr_idle_notify_activity anymore, which was
probably unintended.
This commit is contained in:
parent
d097393732
commit
7d37322906
1 changed files with 4 additions and 5 deletions
9
seat.c
9
seat.c
|
|
@ -229,13 +229,12 @@ handle_keybinding(struct cg_server *server, xkb_keysym_t sym)
|
|||
#ifdef DEBUG
|
||||
if (sym == XKB_KEY_Escape) {
|
||||
wl_display_terminate(server->wl_display);
|
||||
} else
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (server->allow_vt_switch && sym >= XKB_KEY_XF86Switch_VT_1
|
||||
&& sym <= XKB_KEY_XF86Switch_VT_12) {
|
||||
if (server->allow_vt_switch && sym >= XKB_KEY_XF86Switch_VT_1 && sym <= XKB_KEY_XF86Switch_VT_12) {
|
||||
if (wlr_backend_is_multi(server->backend)) {
|
||||
struct wlr_session *session =
|
||||
wlr_backend_get_session(server->backend);
|
||||
struct wlr_session *session = wlr_backend_get_session(server->backend);
|
||||
if (session) {
|
||||
unsigned vt = sym - XKB_KEY_XF86Switch_VT_1 + 1;
|
||||
wlr_session_change_vt(session, vt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue