Tooltip gets triggered when leaving modal dialog #88721

Open
opened 2021-06-01 16:51:26 +02:00 by Leon Zandman · 7 comments

System Information
Operating system: macOS-11.4-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Apple 4.1 Metal - 71.6.4

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-31 15:30, hash: 46a14bd6a3
Worked: -

Short description of error
When moving the mouse cursor outside of a modal File Dialog, sometimes a tooltip is triggered when it shouldn't. Probably an edge detecting bug.

Exact steps for others to reproduce the error
I've included a GIF recording with this bug report that hopefully explains the behavior I noticed. Here are some steps to reproduce:

  1. Start Blender and select File -> Open to display the File Dialog.
  2. Ensure the "Recent" section on the left of the dialog has multiple entries.
  3. Resize the File Dialog so that the "Recent" section is truncated by the bottom border of the File Dialog. It should be truncated so that it displays only the top few recent folders (i.e. the other folders, the little disclosure triangle and the section's bottom drag bar shouldn't be visible).
  4. Hover the cursor over the File Dialog and move it outside of the dialog, making sure you exit the dialog through the bottom part of the "Recent" section.
  5. Watch as the "Active Recent Folder" tooltip gets triggered/displayed while the mouse cursor is outside of the dialog. This shouldn't happen!
  6. Now enlarge the bottom part of the File Dialog, so that the "Recent" section is no longer truncated and fully displayed (including its disclosure triangle and drag bar).
  7. Repeat step 4 and notice the tooltip doesn't get triggered anymore! This is the desired behavior.
  8. Resize the bottom part of the File Dialog so that the "Recent" section is again truncated, but this time don't truncate its bottom part (i.e. the disclosure triangle should be visible).
  9. Repeat step 4 and notice the tooltip again doesn't get triggered anymore! This is again the desired behavior.

Blender-Tooltip.gif

Conclusion
It looks like the the File dialog somehow doesn't properly detect the mouse has exited the dialog when it exits directly from a section's contents, thereby not crossing over the section's border/other UI parts.

I hope this makes some sense ;-)

**System Information** Operating system: macOS-11.4-arm64-arm-64bit 64 Bits Graphics card: Apple M1 Apple 4.1 Metal - 71.6.4 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-31 15:30, hash: `46a14bd6a3` Worked: - **Short description of error** When moving the mouse cursor outside of a modal File Dialog, sometimes a tooltip is triggered when it shouldn't. Probably an edge detecting bug. **Exact steps for others to reproduce the error** I've included a GIF recording with this bug report that hopefully explains the behavior I noticed. Here are some steps to reproduce: 1. Start Blender and select `File -> Open` to display the File Dialog. 2. Ensure the "Recent" section on the left of the dialog has multiple entries. 3. Resize the File Dialog so that the "Recent" section is truncated by the bottom border of the File Dialog. It should be truncated so that it displays only the top few recent folders (i.e. the other folders, the little disclosure triangle and the section's bottom drag bar shouldn't be visible). 4. Hover the cursor over the File Dialog and move it outside of the dialog, making sure you exit the dialog through the bottom part of the "Recent" section. 5. Watch as the "Active Recent Folder" tooltip gets triggered/displayed while the mouse cursor is outside of the dialog. This shouldn't happen! 6. Now enlarge the bottom part of the File Dialog, so that the "Recent" section is no longer truncated and fully displayed (including its disclosure triangle and drag bar). 7. Repeat step 4 and notice the tooltip doesn't get triggered anymore! This is the desired behavior. 8. Resize the bottom part of the File Dialog so that the "Recent" section is again truncated, but this time don't truncate its bottom part (i.e. the disclosure triangle should be visible). 9. Repeat step 4 and notice the tooltip again doesn't get triggered anymore! This is again the desired behavior. ![Blender-Tooltip.gif](https://archive.blender.org/developer/F10152948/Blender-Tooltip.gif) **Conclusion** It looks like the the File dialog somehow doesn't properly detect the mouse has exited the dialog when it exits directly from a section's contents, thereby not crossing over the section's border/other UI parts. I hope this makes some sense ;-)
Author

Added subscriber: @Zandman

Added subscriber: @Zandman
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

Answering technically since I know you have submitted some patches recently.

Blender's event loop generally sends messages only to the active area, the one currently under the mouse. So the area is getting messages while your mouse is over it, but then they stop when you leave. This design does mean that we can quite often miss notifications that you have left an area, if knowing that is important. An easy way to see this behavior (also in File Manager) is to highlight one of the file names, quickly move your mouse out of the area at the closest edge, and see that it can still be highlighted.

This normally doesn't cause a lot of real problems, generally just the odd thing highlighted wrong for a while. When it does matter though, there is a callback that can be used. The ScrArea has a member called "type", which is a SpaceType struct. One of the callbacks there is "deactivate". So you can write a handler to clean up whatever you want. An example of it being used is in space_outliner.c

Answering technically since I know you have submitted some patches recently. Blender's event loop generally sends messages only to the active area, the one currently under the mouse. So the area is getting messages while your mouse is over it, but then they stop when you leave. This design does mean that we can quite often miss notifications that you have left an area, if knowing that is important. An easy way to see this behavior (also in File Manager) is to highlight one of the file names, quickly move your mouse out of the area at the closest edge, and see that it can still be highlighted. This normally doesn't cause a lot of real problems, generally just the odd thing highlighted wrong for a while. When it does matter though, there is a callback that can be used. The ScrArea has a member called "type", which is a SpaceType struct. One of the callbacks there is "deactivate". So you can write a handler to clean up whatever you want. An example of it being used is in space_outliner.c
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Guess we can mark this a low priority issue.

@Harley , please edit the status if you feel this is not a bug :)

Guess we can mark this a low priority issue. @Harley , please edit the status if you feel this is not a bug :)
Author

I don't know if it's related, but I have experienced several times where I perform actions like moving a node in the Compositor or moving the mouse to scale an object, where the mouse leaves the windows. In theory you should be able to continue moving the mouse and the operation will continue too. But in practice often the operation goes haywire and the scale factor increases very much or the node shoots off the screen. I've seen this reported in other bug reports too, so it looks like some mouse messages get lost when the mouse crosses window borders.

I don't know if it's related, but I have experienced several times where I perform actions like moving a node in the Compositor or moving the mouse to scale an object, where the mouse leaves the windows. In theory you should be able to continue moving the mouse and the operation will continue too. But in practice often the operation goes haywire and the scale factor increases very much or the node shoots off the screen. I've seen this reported in other bug reports too, so it looks like some mouse messages get lost when the mouse crosses window borders.
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:23:26 +01:00
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
3 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#88721
No description provided.