Creating a detached window makes the main window irreversibly loose focus in 2.93.2 + #92331
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#92331
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
Operating system: macOS Big Sur 11.5.2
Graphics card: Apple M1 8 core, Metal GPUFamily Apple 7
Blender Version
Broken:
2.93.2,
1eb06de260
, master, 2021-08-03 05:582.93.5,
a791bdabd0
, master, 2021-10-05 12:04 (both ARM and Intel)2.93.6 Release Candidate,
0930a70e81
, master, 2021-10-06 10:523.0.0 Alpha,
452c78757f
, master, 2021-10-17 17:10Worked: 2.92.0,
02948a2cab
, master, 2021-02-24 16:25Short description of error
Creating a new detached window from any viewport by holding shift and dragging the corner
makes the main window loose focus without ability to regain it.
The focus can't be regained by clicking on the main window -- the newly created window stays focused instead.
The main window with the lost focus stays below the new window and can't be put on top. No hotkeys are working in the main window with the lost focus, however menus and objects are selectable.
The focus to the main window can only be regained by closing this newly created detached window.
When connecting a second monitor and dragging the new detached window there, the focus on the main window that stays on the main monitor remains lost with the same behaviour as described above. However, after dragging the main window to the secondary monitor as well, it becomes focused when clicking on it, comes on top of the new window and regains hotkey functionality. The new window can be focused as well by clicking on it. Dragging either of the windows back to the main monitor makes the main window loose focus again and become unfocused as described above.
Exact steps for others to reproduce the error
Based on the default startup:
4. Observe the main window staying unfocused and still staying below, with the menus and objects selectable but hot keys not working.
*edit:
Creating a detached window in blender 2.92.0, saving the file and then opening it in the 2.93.5 makes the windows work properly in that file, with the ability to change focus between them and hotkey functionality working.
Currently this is the only way to bypass this bug and make detached windows work as they used to.
Added subscriber: @philippsokolov
#96103 was marked as duplicate of this issue
#88841 was marked as duplicate of this issue
#94346 was marked as duplicate of this issue
Creating a detached window makes the main window irreversibly loose focusto Creating a detached window makes the main window irreversibly loose focus in 2.93.5 +Creating a detached window makes the main window irreversibly loose focus in 2.93.5 +to Creating a detached window makes the main window irreversibly loose focus in 2.93.2 +Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Confirmed'
Thanks for the report, I can confirm it on a Mac
M1
.It's pretty inconvenient not to be able to use hotkeys in the main window.
Thanks @mano-wii !
Added subscriber: @jenkm
be9842f65b
It's not clear to me why topbar's "New Window" and editor's "Duplicate into New Window" work differently,
for me it's the same feature. It probably works differently on Windows and makes some sense there.
So just revert back to how it was before this commit, for Mac at least:
Added subscriber: @Harley
I'm not seeing this change in the commit you reference. But there were a lot of changes in there and in other patches at that time.
AFAIK they shouldn't, but can vary by platform if you want. "New Main Window" should generally behave like an entirely separate window, as if it belonged to a different application. While "New Window" and "Duplicate into New Window" should act like children of the main window, so controlled by or subservient to the main window in whatever makes sense for the platform. But in all cases all windows should be usable at any time. That difference is controlled by that first argument - "toplevel".
The intent of "dialog" is to make visual changes to make the window appear like a temporary "dialog-like" window, optionally constraining input to just that window. Really just for actual dialogs, not real windows.
But that argument is not used on Windows at all yet. Which means your proposed change does not do any harm on Windows. So if that fixes this on Mac I'd say submit a patch. You'd just want to make it clear it is to fix this Mac issue, but add either me or Ray to sign off that it doesn't break Windows. And would probably need a check on Linux too.
It looks like it was:
area_dupli_invoke
>WM_window_open
>wm_window_new
with dialog = falseand it became:
area_dupli_invoke
>WM_window_open
with dialog = trueMaybe just a typo. I guess dialog = true is only needed for file selector.
Probably since it has no change on my platform.
It probably has some change on Mac that you guys like. On windows I'd rather it behave just as a regular child window and not do any of the app modal dialog stuff. I don't mind little windows that just ask "yes" and "no" being modal but nothing too complex.
But again, give it a try with dialog true and false and see what you like. It is the Mac guys that get to decide which is better.
Added subscriber: @dresban
Added subscribers: @jean-martin-barbut, @lichtwerk, @ankitm, @PratikPB2123
Added subscriber: @brecht
This small change seems to do the trick:
Even reviewing the code in edffb0, the patch and the comments, I'm still not sure why non-dialog windows cannot be active if there is a dialog window.
@brecht, if I'm not mistaken you worked on this code, is this something for you to check?
@mano-wii, a dialog window is blocking and modal. That's the standard definition in other UI toolkits, and it's the same in Blender. So that's why no other window can become active, the users must complete the task in the dialog window before doing other tasks.
The
SCREEN_OT_area_dupli
operator should not be creating a dialog window.@jenkm's proposed change in #92331#1276749 looks good to commit to me.
Just to reiterate my earlier comment, and probably state the obvious, on the Windows platform we are choosing to do nothing special if the Blender window is created with isDialog. This is because Blender currently does not create any windows that we’d consider meeting the definition of “dialog” for us (small, simple, app-modal).
I think the file browser should be modal on all platforms, and at least when we initially added the new filebrowser window it was meant to be that way but not implemented on all platforms, not a deliberate choice. This summarizes the intended behavior at the time: D5810#133638
There may have been other design discussions or decisions since though.
That's mostly why I mentioned it, because quite often we are not aware of differences between platforms.
On the Windows platform all the windows-related stuff is working so nicely now, including the behavior of File Browser, Preferences, etc. I'd hate to deliberately add blocking to a program meant to be as non-blocking as possible. Being app-modal is generally only a constraint to user behavior, without much benefit, except maybe when it is asking something important like "are you sure you want to do this scary thing?" LOL. How these windows are expected to behave can vary because of platform norms. But I probably should add add support for modal windows anyway, just in case.
I tested the proposed solution in #92331#1276749, and noticed some changes that might not be desirable:
If we want to keep these behaviors (and not change the behavior of dialog windows), we may need to think about a new design for the window creation API.
I think we simply don't support these types of child windows that always stay on top. Due to the lack of proper focus it was already not possible in practice to make use of this, and it's not following Blender's non-overlapping design anyway.
It is unclear what exactly you are referring to here.
"these types of child windows" on this thread would be child windows on Mac, which currently exhibit a specific problem that does not exist on Windows. These types of windows work well on Windows.
"Due to the lack of proper focus it was already not possible in practice to make use of this" - Again, these windows work very well for our Windows users now. A very small number have asked for changes to focus behavior but that is not a big complaint as our windows are behaving platform-compliant, so working as almost all users expect them to.
So not sure if your comment was specific to this issue on Mac, or was a response to my earlier comments and you are somehow wanting to remove functionality from Windows users.
Yes, this patch is correct. Although this is less a revert of my changes, but more of a correction of my mistake there.
In my commit you'll see lots of changes to the window-opening code. The old
area_dupli_invoke
called a lot of code but ultimately used the oldWM_window_open
which always created non-temp windows with "dialog" set to false. The updatedWM_window_open
was given more options. so could be used witharea_dupli_invoke
, but is now called with "dialog" true, and "temp" false.I was trying to make changes to this code without affecting other platforms, but failed in this case. I didn't notice because we don't currently implement "modal" behavior on Windows.
@jenkm
I think you should just submit that patch, and set just me as reviewer (own code) and I can commit with you as author.
Added subscriber: @Robw
Sorry, can't wait any longer. Will submit a patch.
This issue was referenced by
353376c783
Changed status from 'Confirmed' to: 'Resolved'
Can confirm, newly created windows are no longer modal and multiple areas can be separated out from a window, all as expected.
Thank you @Harley!
There is some residual behavior: each window acts as a 'main application window'. It is possible to get the same (in my case: 'Quit') dialog in multiple windows.
Steps to reproduce:
You now have Quit dialogs in both windows.
This behavior does not seem to hinder application functionality, it is something users may need to be aware of.
You're welcome.
Interesting. I can see the same behavior in 3.0 (didn't check back further), but I don't think anyone else has noticed that yet. You could file a bug report for it, but not sure what the best behavior would be. It is nice to get the warning on the active monitor. And I don't think I'd want to remove dialogs from a window just because it loses focus. Seems harmless though. So just don't do that. LOL.
Was planning on doing exactly that 😄
Hence the "doesn't hinder - users may need to be aware of"