Skip to content

Restore focus events between main and floating windows - #1112

Open
wieslawsoltes wants to merge 3 commits into
masterfrom
agent/issue-1095-cross-window-focus-event
Open

Restore focus events between main and floating windows#1112
wieslawsoltes wants to merge 3 commits into
masterfrom
agent/issue-1095-cross-window-focus-event

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Owner

Summary

  • recognize re-focusing an existing root-local document when its owner dock was inactive
  • raise FocusedDockableChanged for the real cross-root transition even when the root's stored focused reference is unchanged
  • avoid deactivating the same document that is being restored
  • keep repeated clicks on the already-active document deduplicated

Testing

  • dotnet test tests/Dock.Model.Mvvm.UnitTests/Dock.Model.Mvvm.UnitTests.csproj --no-restore
  • dotnet test tests/Dock.Model.Mvvm.UnitTests/Dock.Model.Mvvm.UnitTests.csproj --filter "FullyQualifiedName~SetFocusedDockable_Raises_Events_When_Focus_Returns" --no-restore
  • dotnet build src/Dock.Model/Dock.Model.csproj -c Release --no-restore
  • git diff --check

Fixes #1095

@wieslawsoltes
wieslawsoltes marked this pull request as ready for review July 14, 2026 21:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 225ebf169b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Dock.Model/FactoryBase.Init.cs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1f60dda4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Dock.Model/FactoryBase.Events.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FocusedDockableChanged event is not triggered when switching between Main Window and Floating Window

1 participant