From 340810e49ca2660540005fd25edba0ecf725cc11 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 17 Jul 2020 13:44:46 +0200 Subject: [PATCH] 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. --- seat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/seat.c b/seat.c index 48c126f..651ed32 100644 --- a/seat.c +++ b/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);