Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restore focused windows after dock panel is restored. #7224

Closed
krulci opened this issue Jan 15, 2024 · 1 comment
Closed

Unable to restore focused windows after dock panel is restored. #7224

krulci opened this issue Jan 15, 2024 · 1 comment

Comments

@krulci
Copy link

krulci commented Jan 15, 2024

Version/Branch of Dear ImGui:

Version 1.90, Branch: master (master/docking/etc.)

Back-ends:

web

Compiler, OS:

Windows 11

Full config/build information:

https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html
the behavior can be observed directly here.

Details:

My Issue/Question:

Focus windows may not be preserved when dockspace is hidden and reenabled.
This may be directly observed in the web version of imgui_manual.

  1. Select a window
  2. Click Hide All
  3. Click View All
  4. The first frame of the reenabled layout will focus the previous selected window before hidden (frame 464 in the attached video).
  5. The next frame of the reenabled layout will focus the last window of a dock node (frame 476 in the attached video).

Screenshots/Video:

bandicam.2024-01-15.01-48-41-596.mp4

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
https://github.com/pthom/imgui_manual/tree/master/src
@ocornut
Copy link
Owner

ocornut commented Jan 15, 2024

Hello,
This is a known issue, see #2304
Basically newly appearing windows are all trying to take focus as they appear, so the last submitted one will win it. Due to how the nav system currently work it's not a trivial fix but we made changes over time to fix some cases.

We recently made a fix for the node not holding the final focused window, but for that node the issue is quite noticeable still.

@ocornut ocornut closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants