From 737ff9f823011a27c1672eccaa99c68f8156377b Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Wed, 5 Nov 2025 20:27:14 -0500 Subject: exit on focus lost option --- keyboard.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'keyboard.c') diff --git a/keyboard.c b/keyboard.c index 1ab8f9e..8341fd1 100644 --- a/keyboard.c +++ b/keyboard.c @@ -2,6 +2,7 @@ #include #include +#include "config.h" #include "state.h" #include "input_field.h" @@ -67,9 +68,11 @@ void wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface) { client_state *state = data; - // close on focus lost - state->running = false; - state->exit_code = EXIT_FAILURE; + // exit on focus lost + if (config.exit_on_focus_lost) { + state->running = false; + state->exit_code = EXIT_FAILURE; + } } void wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard, -- cgit v1.2.3