Window autofocus misbehaves #109886

Closed
opened 2023-07-10 00:36:05 +02:00 by Pootis · 11 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79

Blender Version
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb (from steam)
Worked: Never, this feature only appeared in 3.6.0

Short description of error
Autofocus between main windows works in a weird way: It doesn't autofocus between two fullscreen windows, but does autofocus between one fullscreen window and one windowed. Please see attached video for details as this is hard to describe

Exact steps for others to reproduce the error
You need at least two monitors to replicate this issue: Open Blender -> Create one more main window -> maximize both windows on both monitors and try dragging your mouse between them. It will not autofocus.
Please see the attached video.
I have also attached a photo of my physical setup, just in case.

I did test the latest build (blender-4.0.0-alpha+main.b183e3ae89a6-windows.amd64-release)

Sidenote: It'd be really cool if the autofocus thing was instant, without a one-second delay.

Thank you.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79 **Blender Version** Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: `c7fc78b81ecb` (from steam) Worked: Never, this feature only appeared in 3.6.0 **Short description of error** Autofocus between main windows works in a weird way: It doesn't autofocus between two fullscreen windows, but does autofocus between one fullscreen window and one windowed. Please see attached video for details as this is hard to describe **Exact steps for others to reproduce the error** You need at least two monitors to replicate this issue: Open Blender -> Create one more main window -> maximize both windows on both monitors and try dragging your mouse between them. It will not autofocus. Please see the attached video. I have also attached a photo of my physical setup, just in case. I did test the latest build (blender-4.0.0-alpha+main.b183e3ae89a6-windows.amd64-release) Sidenote: It'd be really cool if the autofocus thing was instant, without a one-second delay. Thank you.
Pootis added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-10 00:36:06 +02:00
Harley Acheson self-assigned this 2023-07-10 04:22:51 +02:00
Member

Thanks for the report. Can confirm with split screen option on single monitor.

AFAICS this is happening when window is snapped to screen borders.

Thanks for the report. Can confirm with split screen option on single monitor. AFAICS this is happening when window is snapped to screen borders.
Pratik Borhade added
Module
User Interface
Status
Confirmed
Platform
Windows
and removed
Status
Needs Triage
labels 2023-07-10 05:23:18 +02:00

On Blender 3.6.0, Windows 10

@MrKleiner

Unless I am missing something here, it works as intended.

Tried it on two monitors and it works with fullscreen windows. Also watched your video, where I can see it is also working with fullscreen windows.

Unless we are noticing different things, in your video your fullscreen windows are responding to you Blender's autofocus. I can see a shade change when you mouse over.

Instead of only noticing the title bars, to confirm use your mouse scroll button to zoom in and out of two fullscreen viewports on two different monitors. Or zoom in and out on your UV editor area, and your viewport in the other monitor. I tried it and it works flawlessly.

On Blender 3.6.0, Windows 10 @MrKleiner Unless I am missing something here, it works as intended. Tried it on two monitors and it works with fullscreen windows. Also watched your video, where I can see it is also working with fullscreen windows. Unless we are noticing different things, in your video your fullscreen windows are responding to you Blender's autofocus. I can see a shade change when you mouse over. Instead of only noticing the title bars, to confirm use your mouse scroll button to zoom in and out of two fullscreen viewports on two different monitors. Or zoom in and out on your UV editor area, and your viewport in the other monitor. I tried it and it works flawlessly.
Member

@funty - Unless I am missing something here...see a shade change when you mouse over.

What you are seeing is the other window respond to mouse movement and input, but what would not work is keyboard entry and shortcuts. On Windows, keyboard events are only sent to the (one) active window, which you can see gets a different title bar color.

to confirm use your mouse scroll button to zoom in and out of two fullscreen viewports...

Instead what you want to do for testing is move your mouse to a 3DView of the other window and press "G". In older versions of Blender you would need to first click the window to activate it. With this new "auto activate" behavior the window should automatically become active and work without having to click it.

> @funty - Unless I am missing something here...see a shade change when you mouse over. What you are seeing is the other window respond to _mouse_ movement and input, but what would not work is **keyboard** entry and shortcuts. On Windows, keyboard events are only sent to the (one) active window, which you can see gets a different title bar color. > to confirm use your mouse scroll button to zoom in and out of two fullscreen viewports... Instead what you want to do for testing is move your mouse to a 3DView of the other window and press "G". In older versions of Blender you would need to first click the window to activate it. With this new "auto activate" behavior the window _should_ automatically become active and work without having to click it.

@Harley

Yes I see it does not respond with keyboard input when both windows are fullscreen. Otherwise it does.

@Harley Yes I see it does not respond with keyboard input when both windows are fullscreen. Otherwise it does.

@Harley

After further experimentation, for some reason, its working as you said it should be. I tried the following, with both windows at fullscreen:

  • G, R, S
  • Number pad +, and - to zoom in and out
  • CTRL + A for the popup
  • A to select all

I have no idea what I did differently from the last time I checked it, before I replied, other than close Blender and restart it.

And I am still confused, as to what the issue is.

@Harley After further experimentation, for some reason, its working as you said it should be. I tried the following, with both windows at fullscreen: - G, R, S - Number pad +, and - to zoom in and out - CTRL + A for the popup - A to select all I have no idea what I did differently from the last time I checked it, before I replied, other than close Blender and restart it. And I am still confused, as to what the issue is.

@Harley

Alright, I believe I may have narrowed it down. Hopefully, this will help clear things out.

When I select Window > New Window, everything works as it should, keyboard input responds as it should with fullscreen windows.

However, when I select Window > New Main Window, that is when the OP issue arises. Keyboard input no longer works as it does with Window > New Window, when you have fullscreen windows open.

@Harley Alright, I believe I may have narrowed it down. Hopefully, this will help clear things out. When I select Window > New Window, everything works as it should, keyboard input responds as it should with fullscreen windows. However, when I select Window > New Main Window, that is when the OP issue arises. Keyboard input no longer works as it does with Window > New Window, when you have fullscreen windows open.
Member

We can't auto-activat ALL windows, as there are some times when that is annoying. So we do so in these circumstances:

  • Parent to its child
  • Child to its parent
  • between siblings (same parent)
  • between main windows that don't overlap.

In this case we have two main windows. This works as I expect unless BOTH windows are maximized on adjacent monitors. Unfortunately the Windows API call GetWindowRect retrieves a rectangle that includes the window's dropshadow, which means that they are detected as overlapping if they share an edge.

So this error does not require multiple monitors or the maximization of the windows. Simply make the main Blender window less than half the width of a monitor. Select Window / New Window and arrange the two windows so that they are next to each other. If they are closer than about 20 pixels they won't auto-activate.

Will have to think of a nice way to fix this. Might have to use DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS, but I think that is not adjusted for DPI.

We can't auto-activat ALL windows, as there are some times when that is annoying. So we do so in these circumstances: * Parent to its child * Child to its parent * between siblings (same parent) * **between main windows that don't overlap**. In this case we have two main windows. This works as I expect unless BOTH windows are maximized on adjacent monitors. Unfortunately the Windows API call `GetWindowRect` retrieves a rectangle that includes the window's dropshadow, which means that they are detected as overlapping if they share an edge. So this error does not require multiple monitors or the maximization of the windows. Simply make the main Blender window less than half the width of a monitor. Select Window / New Window and arrange the two windows so that they are next to each other. If they are closer than about 20 pixels they won't auto-activate. Will have to think of a nice way to fix this. Might have to use DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS, but I think that is not adjusted for DPI.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-07-11 21:14:01 +02:00
Member

@Harley hi, can we backport your fix to LTS?: #109399

@Harley hi, can we backport your fix to LTS?: #109399
Member

Yes, but can we wait for 3.6.2? 3.6.1 is only a week away.

Yes, but can we wait for 3.6.2? 3.6.1 is only a week away.
Member

No problem. We can still add it to the list with a little remark "Consider this commit for 3.6.2, not 3.6.1" 😅

No problem. We can still add it to the list with a little remark "Consider this commit for 3.6.2, not 3.6.1" 😅
Member

@Harley hi, can we backport your fix to LTS?: #109399

I added it to the list for possible inclusion in 3.6.2

> @Harley hi, can we backport your fix to LTS?: #109399 I added it to the list for possible inclusion in 3.6.2
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109886
No description provided.