From 3e1e009a8d6dd62a26f43c7e74dd8979d3a5fc96 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 12 Dec 2025 12:23:46 +0800 Subject: [PATCH] fix: crash when reload_config --- src/config/parse_config.h | 2 +- src/mango.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index d265adc..dc5ef50 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -3184,5 +3184,5 @@ int reload_config(const Arg *arg) { parse_config(); reset_option(); printstatus(); - return 0; + return 1; } diff --git a/src/mango.c b/src/mango.c index 6fb36ad..39c6713 100644 --- a/src/mango.c +++ b/src/mango.c @@ -3386,13 +3386,14 @@ keybinding(uint32_t state, bool locked, uint32_t mods, xkb_keysym_t sym, keycode == k->keysymcode.keycode.keycode3))) && k->func) { - isbreak = k->func(&k->arg); - if (!k->ispassapply) handled = 1; else handled = 0; + isbreak = k->func(&k->arg); + + if (isbreak) break; }