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:
2026-08-17 21:22:36 +09:00
parent 33710178d4
commit 8472474332
2 changed files with 0 additions and 4 deletions

2
wl.c
View File

@@ -126,8 +126,6 @@ modmask(void)
int i;
m = 0;
if(kstate == nil)
return m;
for(i = 0; i < nelem(name); i++)
if(xkb_state_mod_name_is_active(kstate, name[i],
XKB_STATE_MODS_EFFECTIVE) > 0)