From 9e85a3149524f4db72536ecc008f4f3f6367fe45 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 10 Dec 2025 18:29:16 +0800 Subject: [PATCH] opt: allow layershell surface toggle shortcut inhibit --- src/mango.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mango.c b/src/mango.c index 4b249c3..3a2460c 100644 --- a/src/mango.c +++ b/src/mango.c @@ -5658,8 +5658,15 @@ void handle_keyboard_shortcuts_inhibit_new_inhibitor( } // per-view, seat-agnostic config via criteria - Client *c = get_client_from_surface(inhibitor->surface); - if (c && !c->allow_shortcuts_inhibit) { + Client *c = NULL; + LayerSurface *l = NULL; + + int type = toplevel_from_wlr_surface(inhibitor->surface, &c, &l); + + if (type < 0) + return; + + if (type != LayerShell && c && !c->allow_shortcuts_inhibit) { return; }