Skip to content

Fix fullscreen focus with native file dialogs - #6066

Open
volksec wants to merge 3 commits into
secondlife:developfrom
volksec:agent/fix-fullscreen-native-dialog-focus
Open

Fix fullscreen focus with native file dialogs#6066
volksec wants to merge 3 commits into
secondlife:developfrom
volksec:agent/fix-fullscreen-native-dialog-focus

Conversation

@volksec

@volksec volksec commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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_ACTIVATEAPP reports deactivation and the fullscreen handling minimizes the viewer, even though the newly active thread belongs to the viewer process.

Changes

  • Determine whether the thread receiving activation belongs to the current process.
  • Keep the application active for same-process focus transitions.
  • Preserve the existing minimize behavior when focus moves to another application.

Validation

  • git diff --check
  • cmake --build build-vc170-64 --config Release --target llwindow -- /m
  • cmake --build build-vc170-64 --config Release --target secondlife-bin -- /m

Both llwindow.lib and secondlife-bin.exe were built successfully with Visual Studio 2022. Manual reproduction in exclusive fullscreen is still pending.

Signed-off-by: Luan Nutels - VolkSec <luan.nutels@owasp.org>
@volksec
volksec marked this pull request as ready for review July 29, 2026 20:42
@akleshchev
akleshchev requested a review from Copilot July 30, 2026 17:17
@akleshchev
akleshchev self-requested a review July 30, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread indra/llwindow/llwindowwin32.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening any File Dialog breaks the viewer in FullScreen

2 participants