Floating windows switch focus with delay and only if cursor stops moving #111644

Open
opened 2023-08-29 08:45:29 +02:00 by Ludvik Koutny · 14 comments
Contributor

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99

Blender Version
Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: 8bda729ef4dc
Worked: (newest version of Blender that worked as expected)

Short description of error
It seems Blender now automatically switches focus between floating windows, but in such a way which makes it appear as a bug, rather than feature. What it looks like is that window title bars change focus seemingly randomly, appearing to flicker. This is because the focus is not switched immediately, but rather after a short laggy delay, or never if user doesn't stop moving the mouse pointer.

See the attached video (Note: I am not clicking any mouse buttons in the video, just moving the cursor).

Exact steps for others to reproduce the error

  1. In a new scene, open user preferences in floating window
  2. Move the cursor randomly between base window and floating window

Result: The focus between windows is switching with seemingly random delay and random probability.
Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application.

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99 **Blender Version** Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: `8bda729ef4dc` Worked: (newest version of Blender that worked as expected) **Short description of error** It seems Blender now automatically switches focus between floating windows, but in such a way which makes it appear as a bug, rather than feature. What it looks like is that window title bars change focus seemingly randomly, appearing to flicker. This is because the focus is not switched immediately, but rather after a short laggy delay, or never if user doesn't stop moving the mouse pointer. See the attached video (Note: I am not clicking any mouse buttons in the video, just moving the cursor). **Exact steps for others to reproduce the error** 1. In a new scene, open user preferences in floating window 2. Move the cursor randomly between base window and floating window Result: The focus between windows is switching with seemingly random delay and random probability. Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application.
Ludvik Koutny added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-08-29 08:45:30 +02:00
Member

Can't reproduce on linux.

There was another window focusing issue like #108584 and #107802 where blender failed to capture focus on modal window, but this one seems different. 🤔

Can't reproduce on linux. There was another window focusing issue like #108584 and #107802 where blender failed to capture focus on modal window, but this one seems different. 🤔
YimingWu added the
Platform
Windows
Interest
User Interface
labels 2023-08-29 09:41:47 +02:00
Author
Contributor

Can't reproduce on linux.

There was another window focusing issue like #108584 and #107802 where blender failed to capture focus on modal window, but this one seems different. 🤔

Yes, this is on windows. Also note that I am using 1000Hz polling rate mouse, which could contribute to the problem. Windows has notorious problem with not filtering the mouse polling events, so many apps tend to get overwhelmed with them.

> Can't reproduce on linux. > > There was another window focusing issue like #108584 and #107802 where blender failed to capture focus on modal window, but this one seems different. 🤔 Yes, this is on windows. Also note that I am using 1000Hz polling rate mouse, which could contribute to the problem. Windows has notorious problem with not filtering the mouse polling events, so many apps tend to get overwhelmed with them.
Member

I recall on windows there is an option that allows focus switching on mouse hover.

I recall on windows there is [an option](https://www.tenforums.com/tutorials/113260-turn-off-activate-window-hovering-over-mouse-windows.html) that allows focus switching on mouse hover.
Author
Contributor

I recall on windows there is an option that allows focus switching on mouse hover.

Yes, exactly. This should be handled by Windows, not Blender itself. No other software I know of I've ever used in Windows has done window focus switching on it's own. I originally thought it's either a bug or I have some malware which is messing with window focus on my machine.

> I recall on windows there is [an option](https://www.tenforums.com/tutorials/113260-turn-off-activate-window-hovering-over-mouse-windows.html) that allows focus switching on mouse hover. Yes, exactly. This should be handled by Windows, not Blender itself. No other software I know of I've ever used in Windows has done window focus switching on it's own. I originally thought it's either a bug or I have some malware which is messing with window focus on my machine.
Member

Ok, so I assume the problem is resolved :D Will close this issue. Thanks for reporting!

Ok, so I assume the problem is resolved :D Will close this issue. Thanks for reporting!
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-08-29 09:59:11 +02:00
Author
Contributor

Ok, so I assume the problem is resolved :D Will close this issue. Thanks for reporting!

What? No, of course it's not! It's still there. I have that Windows setting disabled, yet the Blender still switches the windows on it's own, in confusing, unreliable and laggy manner!

> Ok, so I assume the problem is resolved :D Will close this issue. Thanks for reporting! What? No, of course it's not! It's still there. I have that Windows setting disabled, yet the Blender still switches the windows on it's own, in confusing, unreliable and laggy manner!
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-08-29 10:39:21 +02:00
Member

Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application.

Harley , implemented the auto window focus: defd95afcd
AFAICS, 50ms of hover time is required to change the active window.
Not a bug unless I'm missing something.


I think you expect auto-focus to be handled by OS, not the code written in software, right?

cc @Harley

> Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application. Harley , implemented the auto window focus: defd95afcd44a17a82c54134a9762290b384e664 AFAICS, 50ms of hover time is required to change the active window. Not a bug unless I'm missing something. - - - I think you expect auto-focus to be handled by OS, not the code written in software, right? cc @Harley
Member

There was also a devtalk thread for the discussion and feedback: https://devtalk.blender.org/t/please-test-windows-auto-focus-patch-build/26965

There was also a devtalk thread for the discussion and feedback: https://devtalk.blender.org/t/please-test-windows-auto-focus-patch-build/26965
Author
Contributor

Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application.

Harley , implemented the auto window focus: defd95afcd
AFAICS, 50ms of hover time is required to change the active window.
Not a bug unless I'm missing something.


I think you expect auto-focus to be handled by OS, not the code written in software, right?

cc @Harley

Well on my machine it's just indistinguishable from a bug, because how laggy and inconsistent it is. I'd at least welcome an option to disable it, because rather than being a feature to help me, it just makes my Blender window headers flicker pretty much randomly and constantly as long as I am working with multiple windows.

> > Expected: The window focus doesn't switch until the window is activated (user clicks on it), as is consistent with literally every other windows application. > > Harley , implemented the auto window focus: defd95afcd44a17a82c54134a9762290b384e664 > AFAICS, 50ms of hover time is required to change the active window. > Not a bug unless I'm missing something. > - - - > I think you expect auto-focus to be handled by OS, not the code written in software, right? > > cc @Harley Well on my machine it's just indistinguishable from a bug, because how laggy and inconsistent it is. I'd at least welcome an option to disable it, because rather than being a feature to help me, it just makes my Blender window headers flicker pretty much randomly and constantly as long as I am working with multiple windows.
Member

I'm observing the same behavior as shown in the video but it is not laggy.
The problem at your end could be due to the high polling rate mouse.

I'd at least welcome an option to disable it,

Let's wait for Harley's reply 😅

I'm observing the same behavior as shown in the video but it is not **laggy**. The problem at your end could be due to the high polling rate mouse. > I'd at least welcome an option to disable it, Let's wait for Harley's reply 😅
Author
Contributor

I'm observing the same behavior as shown in the video but it is not laggy.
The problem at your end could be due to the high polling rate mouse.

I'd at least welcome an option to disable it,

Let's wait for Harley's reply 😅

Yes, this would not be the first time. I had similar issues with other software, where for example the viewport stopped orbiting if you moved the mouse too fast. This would also explains why the probability of focus switch depends on how fast the cursor is moving/if it stops.

> I'm observing the same behavior as shown in the video but it is not **laggy**. > The problem at your end could be due to the high polling rate mouse. > > > I'd at least welcome an option to disable it, > > Let's wait for Harley's reply 😅 Yes, this would not be the first time. I had similar issues with other software, where for example the viewport stopped orbiting if you moved the mouse too fast. This would also explains why the probability of focus switch depends on how fast the cursor is moving/if it stops.
Member

When I first started working on this feature I had assumed there would need to be a preference to turn it off and on. I was a bit surprised and pleased that nobody had complained until now.

With the auto-focusing, users no longer have to click on a window in order to activate it so that it can receive mouse and keyboard input. This auto-focusing happens as fast as Windows will allow. It generally takes about 100 ms to switch.

With this on you no longer have to consider whether a window is active or not. You can drag directly from window to window. Or just move your mouse to a new window, press "g" and start moving the active object.

If you really want to go back to having to click on a window before you could interact with it then we'd have to add a user preference for that.

When I first started working on this feature I had assumed there would need to be a preference to turn it off and on. I was a bit surprised and pleased that nobody had complained until now. With the auto-focusing, users no longer have to click on a window in order to activate it so that it can receive mouse and keyboard input. This auto-focusing happens as fast as Windows will allow. It generally takes about 100 ms to switch. With this on you no longer have to consider whether a window is active or not. You can drag directly from window to window. Or just move your mouse to a new window, press "g" and start moving the active object. If you really want to go back to having to click on a window before you could interact with it then we'd have to add a user preference for that.
Author
Contributor

When I first started working on this feature I had assumed there would need to be a preference to turn it off and on. I was a bit surprised and pleased that nobody had complained until now.

With the auto-focusing, users no longer have to click on a window in order to activate it so that it can receive mouse and keyboard input. This auto-focusing happens as fast as Windows will allow. It generally takes about 100 ms to switch.

With this on you no longer have to consider whether a window is active or not. You can drag directly from window to window. Or just move your mouse to a new window, press "g" and start moving the active object.

If you really want to go back to having to click on a window before you could interact with it then we'd have to add a user preference for that.

I'd be okay with it if it was instant. But right now it's very laggy and happens randomly based on cursor speed, so it looks more like a bug. You can see it on the attached video (where I am not clicking the mouse even once while being above windows for far longer than 100ms). Do you by any chance have a mouse with 1000hz polling rate so you could test it on windows?

I was also hoping that there would be a better way to address inability to interact with floating windows. These are all the pieces of software I've used with multi-windows (two monitors) on regular basis:
3ds Max
Unreal Engine
Unity
Blackmagic Fusion
VSCode
VS 2022
WorldMachine

And none of them ever did the window focusing themselves (as in seeing the window title bars refocus by mere hovering over the windows), yet in all of them, any interaction after switching between windows always worked instantly. I know it never worked in Blender, because Blender was the only software I gave up on using on multiple screens exactly because of this, but I am 100% sure there must be a better solution to capture the first input, because all the other software packages I've used manage it.

> When I first started working on this feature I had assumed there would need to be a preference to turn it off and on. I was a bit surprised and pleased that nobody had complained until now. > > With the auto-focusing, users no longer have to click on a window in order to activate it so that it can receive mouse and keyboard input. This auto-focusing happens as fast as Windows will allow. It generally takes about 100 ms to switch. > > With this on you no longer have to consider whether a window is active or not. You can drag directly from window to window. Or just move your mouse to a new window, press "g" and start moving the active object. > > If you really want to go back to having to click on a window before you could interact with it then we'd have to add a user preference for that. I'd be okay with it if it was instant. But right now it's very laggy and happens randomly based on cursor speed, so it looks more like a bug. You can see it on the attached video (where I am not clicking the mouse even once while being above windows for far longer than 100ms). Do you by any chance have a mouse with 1000hz polling rate so you could test it on windows? I was also hoping that there would be a better way to address inability to interact with floating windows. These are all the pieces of software I've used with multi-windows (two monitors) on regular basis: 3ds Max Unreal Engine Unity Blackmagic Fusion VSCode VS 2022 WorldMachine And none of them ever did the window focusing themselves (as in seeing the window title bars refocus by mere hovering over the windows), yet in all of them, any interaction after switching between windows always worked instantly. I know it never worked in Blender, because Blender was the only software I gave up on using on multiple screens exactly because of this, but I am 100% sure there must be a better solution to capture the first input, because all the other software packages I've used manage it.
Author
Contributor

@Harley Any news on this? The window title bars constantly randomly flashing with random delay is getting really frustrating. It makes work with any floating windows very difficult, because the UI constantly feels bugged. It's as if I had some malware on my computer which seemingly randomly switches window focus around.

@Harley Any news on this? The window title bars constantly randomly flashing with random delay is getting really frustrating. It makes work with any floating windows very difficult, because the UI constantly feels bugged. It's as if I had some malware on my computer which seemingly randomly switches window focus around.
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#111644
No description provided.