Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

0

Found in

2017.4

2018.4

2019.2

2019.3

2019.3.0f3

2020.1

Issue ID

1210328

Regression

No

EventType.DragUpdated is being called when the calling Window is unfocused

IMGUI

-

How to reproduce:
1. Open the attached project
2. Open the "DRAG DROP BUG" Window (Window->DRAG DROP BUG)
3. Click and drag the "Drag Me." Button outside from the Window

Expected result: EventType.DragUpdated is not called when the Window is unfocused
Actual result: EventType.DragUpdated is called when the Window is unfocused

Reproducible with: 2017.4.36f1, 2018.4.15f1, 2019.2.18f1, 2019.3.0f4, 2020.1.0a18

  1. Resolution Note (2020.1.X):

    1. The issue is, when user drags the mouse with MouseDown to another window, he is receiving DragUpdated event even when he exits the first window. In his opinion this should no be the case as the window loses the focus.
    2. The DragUpdated event is received in the second window, only when the mouse is in the coordinates of the first window dimensions.
    3. The reason for the events to be generated in second window is that, the mouse values are being compared relative to the new window dimensions and using the old window rect(GUIClip.toprect), which is the previous window as we are dragging.
    4. To enable the second widow to be toprect, it needs to processed through OnGUI which is invoked only when the focus comes the second window, in this case it never happens as we are still in Drag operation from first window.
    5. Even though the mouse has reached the second window we will still receive the OnGUI calls for first window as we are still in the drag operation.
    6. This is the case when dragging something that cannot be placed in the second window. Try dragging a folder to Heirarchy from Projects window and you can see this, but that wont be the case when dragging a prefab.
    From my analysis I believe this to be design issue rather than a bug. For now I will put this on hold until we can come up with a concrete design for this issue.

    After a discussion with @philip resolving this as postponed for now.

    https://unity.slack.com/archives/CBJG0TGVD/p1587732854123400

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.