File browser puts focus on wrong window after closing the dialog #72693
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#72693
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Applies to all operating systems
Blender Version
Broken: 2.81a
Worked: 2.80 (Before the new file browser)
Short description of error
Closing the file browser puts the focus on the newest child window, disregarding which window was originally in focus before the file browser was opened.
Exact steps for others to reproduce the error
Open a file browser dialog, e.g. through File > Append and close it
The focus switches to the child window, even though the dialog was started from there.
Added subscriber: @VanessaE
Added subscriber: @rjg
Thank you for the new report, I can reproduce this behavior. The missing key fact was that you don't close the image editor window. The behavior is not exclusive to the exporting of .STLs, it affects all file browser dialogs. It seems the most recently created window, that is a child of a main window, is getting the focus afterwards.
A simpler test is to create two new windows through Window > New Window with adjusted perspective in the 3D view in order to keep track what the most recently created one is. Select the main window and open a file browser windows, e.g. through File > Append and close it by pressing Cancel. The most recently created child window always gets the focus afterwards. This does not apply to a new main window created through Window >New Main Window when there aren't any new child windows yet. When opening and closing the file browser on the new main window it will still returns to the last child window of the original main window. When a child window for the new main window is created through Window > New Window, it will jump this one as well when the test is repeated.
Ah, yes, I noticed that behavior as well (in my case, opening the user preferences will re-use other windows such as the Image Editor, if it's open)
Added subscriber: @JacquesLucke
I can reproduce the behavior using the steps described by @rjg.
However, before this task should be confirmed, the task title and description should be updated to reflect the actual bug better to help the developer who is going to work on this.
Export to STL pops-up Image Editor windowto Focus switches to newest child window after closing file browser dialog, not the window that originally had the focusChanged status from 'Needs Triage' to: 'Confirmed'
Focus switches to newest child window after closing file browser dialog, not the window that originally had the focusto File Browser switches focus to wrong window after closing dialogFile Browser switches focus to wrong window after closing dialogto File browser puts focus on wrong window after closing the dialogAdded subscriber: @JulianEisel
The reported issue is caused by this workaround: https://developer.blender.org/diffusion/B/browse/master/source/blender/windowmanager/intern/wm_window.c$439
When opening the file browser, we register it in the OS as dialog window - as of now, it's the only kind of window we do that for. For that to work we also need to assign the window to a "parent" window (loosely speaking) to the OS. Now, the OS typically takes over the ordering of windows, moving other non-dialog windows like the Preferences to the back, so that the dialog window and its parent are in front. That makes it seem like the preferences got closed. The workaround is, that we just move other windows back in front when closing a dialog window (i.e. file browser).
Maybe we could workaround this issue too, i.e. by keeping a window selection history. However before too long, we should look into improving our dialog and secondary window behavior, see #69819. With that done, the window ordering workaround that causes this issue can be removed.
So I don't think it's worth the hassle of introducing a temporary workaround for this temporary workaround.
Marking this as "Known Issue".
This issue was referenced by
796412dca0
Changed status from 'Confirmed' to: 'Resolved'