Fix fullscreen focus with native file dialogs - #6066
Open
volksec wants to merge 3 commits into
Open
Conversation
Signed-off-by: Luan Nutels - VolkSec <luan.nutels@owasp.org>
volksec
marked this pull request as ready for review
July 29, 2026 20:42
akleshchev
self-requested a review
July 30, 2026 17:18
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Windows fullscreen focus handling to prevent the viewer from minimizing when focus moves between the main window and a native file dialog owned by the same process (e.g., dialogs running on worker threads), addressing issue #4569.
Changes:
- Add a helper to determine whether a thread ID belongs to the current process.
- Treat
WM_ACTIVATEAPP“deactivation” as still-active when activation moves to a same-process thread, avoiding fullscreen minimize/hide-dialog behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Luan Nutels - VolkSec <luan.nutels@owasp.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent the Windows viewer from minimizing in exclusive fullscreen when focus moves to a native file dialog owned by the same process.
Fixes #4569.
Root cause
Native file dialogs can run on a worker thread. When focus moves between the viewer window and that dialog,
WM_ACTIVATEAPPreports deactivation and the fullscreen handling minimizes the viewer, even though the newly active thread belongs to the viewer process.Changes
Validation
git diff --checkcmake --build build-vc170-64 --config Release --target llwindow -- /mcmake --build build-vc170-64 --config Release --target secondlife-bin -- /mBoth
llwindow.libandsecondlife-bin.exewere built successfully with Visual Studio 2022. Manual reproduction in exclusive fullscreen is still pending.