From 94b57e91e3fa86e21675ff56eaf7a07ff65582c3 Mon Sep 17 00:00:00 2001 From: DanS Date: Sat, 4 Jul 2026 16:12:01 -0500 Subject: [PATCH] fix(security): restore lock-screen interactivity (AllowOverlap on input blocker) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/app_security.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app_security.cpp b/src/app_security.cpp index 839966f..de18333 100644 --- a/src/app_security.cpp +++ b/src/app_security.cpp @@ -785,7 +785,10 @@ void App::renderLockScreen() { ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoSavedSettings); 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::InvisibleButton("##LockInputBlocker", winSize, ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle);