fix(security): restore lock-screen interactivity (AllowOverlap on input blocker)

Regression from the full-window lock overlay: the full-window ##LockInputBlocker
InvisibleButton (drawn first) shadowed the lock card's widgets (PIN/passphrase
input, Unlock button, mode toggle) that overlap it, so clicks never reached them
(dead) and the app's global "hand cursor on clickable hover" fired for the whole
screen. Mark the blocker SetNextItemAllowOverlap() so the later widgets take
hit-test priority — the exact use case in ImGui's docs (invisible button covering
an area where subsequent items are added). The portfolio avoids this by putting
its content in a child window; the lock screen draws direct, so it needs the flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-04 16:12:01 -05:00
parent 10289b33b5
commit 94b57e91e3

View File

@@ -785,7 +785,10 @@ void App::renderLockScreen() {
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse |
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoSavedSettings); ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoSavedSettings);
ImDrawList* dl = ImGui::GetWindowDrawList(); ImDrawList* dl = ImGui::GetWindowDrawList();
// Consume input to everything behind (sidebar included) while locked. // Consume input to everything behind (sidebar included) while locked. AllowOverlap so the lock
// card's widgets (drawn later, on top of this full-window button) still receive clicks/hover —
// without it this blocker shadows them (dead clicks + a whole-screen hand cursor).
ImGui::SetNextItemAllowOverlap();
ImGui::SetCursorScreenPos(winPos); ImGui::SetCursorScreenPos(winPos);
ImGui::InvisibleButton("##LockInputBlocker", winSize, ImGui::InvisibleButton("##LockInputBlocker", winSize,
ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle); ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle);