Skip to content

Plugging in or unplugging display causes hovered editor UI element to desynchronize from mouse position. #106443

Open
@vektor451

Description

@vektor451

Tested versions

  • Reproducible in 4.4.1, 4.4, 4.3, 4.2.1, 4.2
  • Not Reproducible in 4.1.4 and before.

System information

Godot v4.4.1.stable.mono - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 7700 XT (Advanced Micro Devices, Inc.; 32.0.12033.1030) - AMD Ryzen 7 5800X 8-Core Processor (16 threads)

Issue description

When plugging in or unplugging a second display with Godot Editor launched (and maximised, usually), the position of the mouse when hovering over UI elements is disconnected from the actual mouse position, for instance with the hovered element being below where your actual mouse is. When clicking, the click is still processed where your mouse actually is, rather than where the hovered element is. The issue can quickly be fixed by updating the window size, for instance unmaximizing and then maximizing the window.

If using a display such as a television (which is what I am using), when turned on or off the device is effectively treated as being plugged in or unplugged unlike a dedicated computer monitor. This isn't a large issue as it can quickly be fixed as is, however it has been persistent for me since 4.2.

Example video showcasing the issue:
https://github.com/user-attachments/assets/d8476aa9-1280-42bf-8499-3f9e2f8c501c

Steps to reproduce

  • Set up position of second display to end up in a taller overall workspace than with just the first display (Use a vertical monitor, or put the second one at a higher or lower place than the first)
  • Launch Godot. Either the project browser or any project is fine. Usually tends to occur when the window is maximised, however I do think it can still happen when it's not.
  • Unplug or plug in your monitor, or if you're using something like a TV as a monitor, turn it on or off.
  • The issue should now occur, and the hovered element is disconnected from mouse position.
  • Updating the size of the window should bring things back to normal.

Minimal reproduction project (MRP)

This occurs in the Godot editor inside of any project, as well as the project list/manager.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions