wl: modmask's caller has already looked at the keymap
grabkey returns before it asks for the mask when there is no keyboard state, so the guard inside modmask answered a question nobody put to it -- except the test, which was the only caller that could reach it. A check kept alive by the test that reaches it is one line of code and one line of test to delete. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,8 +40,6 @@ wl_modifier_mask(struct ct *t)
|
||||
struct xkb_keymap *km;
|
||||
xkb_mod_mask_t caps, ctrl, shift;
|
||||
|
||||
kstate = nil;
|
||||
CT_EQ_UINT(t, 0, modmask()); /* before any keymap arrives */
|
||||
ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||
km = xkb_keymap_new_from_string(ctx, keymaptext,
|
||||
XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
|
||||
Reference in New Issue
Block a user