Win32: Auto-Raise and -Focus Windows on Hover #104681
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104681
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Harley:AutoFocus"
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?
On the Windows platform, raise windows and give them focus as the mouse
hovers over them. This allows keyboard shortcuts for the area under the
mouse without having to click the window caption to make them active.
This patch makes it so that as you move your mouse between different Blender windows the window under the mouse automatically becomes active - raises and gets focus. And does so all the time and without any user configuration.
Note that this is only when hovering over the client portion of the window, not non-client areas like the caption (title bar). And this is ONLY between separate windows within a single Blender instance, and NOT between Blender and other applications.
Even between Blender windows, not everything is auto-focused. But most things. Specifically:
The situations where windows are NOT auto-focused are primarily:
I haven't tested the latest version of the patch on Windows, but I'm doubtful about child to parent focusing.
If I remember correctly preferences and file browser are child windows, while the render window is not. Regardless, I can't think of a case where I would want any of those windows to automatically go behind the parent window.
Personally at least I can imagine letting the cursor rest outside the child window, to get an unobstructed view of the contents of the child window, and then it suddenly disappearing.
Previous discussion for reference:
https://archive.blender.org/developer/D13951
Marking as request change due to question.
They don't. On Windows if it is a child then it always remains in front of its parent. So for these focus can change from parent to child and back and nothing changes in z-order.
Render window is not a child. But this patch does not automatically change focus for windows like this that have any overlap. It will do so if they don't overlap, in which case there is no z-order change.
For sure and for child windows all that would happen is the parent would get focus (so the titlebar would change) but otherwise everything would remain the same.
You did try it early on and raised similar issues as above that were addressed with the change to having it not change focus on overlapping peer windows.
I subsequently made builds available and asked for feedback here: https://devtalk.blender.org/t/please-test-windows-auto-focus-patch-build/26965
Got a "brings tears to my eyes". LOL
Thanks, given the explanation and user feedback this looks good to me.
Closing with manual commit:
defd95afcd
While this patch sounds really helpful, it caused a lot of confusion while testing nightlies, I believe this patch is the main reason for it. I used to be able to type file names when saving a file using file save window and not worry about where my mouse pointer was. Now pressing a wrong button can messes up your scene, change frames etc if the mouse pointer is not exactly within the borders of the save window, which happened to me a lot lately.
If this patch is in the main, maybe the file save window should be blocking other windows, because I feel like this is really dangerous and the user might not realize that she is messing up with the scene just prior to saving the file.
Thanks for this comment, that does sound annoying.
I don't think that making the File Browser window blocking could be a possible solution as there are many people who rely on using it non-modally, like opening for one purpose but then dragging an image into the 3DViewport instead.
I'd hate to give up on this change though as it offers such nice utility when working with multiple windows. We get so many reports from people saying it is a pain to have to select a window just to use hotkeys.
Do you mind continuing to evaluate this impact, while considering possible solutions and the tradeoff with not having to activate child windows manually? One possible solution is to just make this feature an opt-in preference, but I'd much rather avoid this if possible.
If the focus is on a text field or a modal operator is running, it probably should not change the window focus automatically?
Maybe the information is already at the GHOST level through cursor grabbing and IME, not sure if it's enough.
We would have more options if this wasn't just an isolated change to GHOST_SystemWin32.cpp. This could be exposed higher up, so a wmWindow could have some "don't change focus automatically" that could be set/unset at times. Not sure that that would look like, but maybe "allow_hoverfocus" or similar
But... simpler I could use the "is_dialog" argument that is sent during window creation. On Windows we aren't doing anything with it because we generally don't want different look or behavior with our windows, or even (yet) have code that could make them actually modal (disallowing events to the parent for example). But this might be a bit of "is_dialog" that makes sense. AFAIK File Browser is the only window that is created with is_dialog true (it has changed behavior on Mac). I don't think it is misusing the idea since a true modal dialog would not allow hover focus either.
But the first idea feels better.
I think this is a great feature just that it has a some bad side effects when trying to save a file. I actually deleted objects while saving, instead of deleting a character or moved to wrong frames etc.
I will keep testing it. I feel like this could be optional like you mentioned.
@kursadk - I'm hoping you can test the following build:
https://builder.blender.org/download/patch/PR105446/
Pull request closed