diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-11-05 20:27:14 -0500 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-11-06 19:45:21 -0500 |
| commit | 737ff9f823011a27c1672eccaa99c68f8156377b (patch) | |
| tree | 8efd9ecf7a9c13119d17a53d8638c69380e97f74 /keyboard.c | |
| parent | 784f7000f29498e6c111afa78a53950989ee94b6 (diff) | |
exit on focus lost option
Diffstat (limited to 'keyboard.c')
| -rw-r--r-- | keyboard.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2,6 +2,7 @@ #include <unistd.h> #include <locale.h> +#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, |
