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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user