godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.84k stars 20.15k forks source link

HSplitContainer Becomes Sticky When One Half Has Visibility Toggled and Then Dragged Off Screen #95368

Open ChildLearningClub opened 1 month ago

ChildLearningClub commented 1 month ago

Tested versions

System information

Windows 11 - Godot Engine v4.3.rc3.official - Vulkan(Forward+)

Issue description

hsplitcontainer dragger is never released when one of the two halves has visibility toggled and then the dragger is grabbed by the mouse and pulled outside the viewport window. It should be released as it works when there is no panel visibility change.

https://github.com/user-attachments/assets/94c30679-df71-4ced-9ee2-bbbe7cfab999

Steps to reproduce

toggle the visibility of half of the hsplitcontainer, then grab the dragger and pull it out of the viewport. The dragger is then stuck to the mouse it is never released.

Minimal reproduction project (MRP)

hsplitcontainer_test.zip

kitbdev commented 1 month ago

Looks like this is happening because the window stops getting input events when the mouse leaves it if the window wasn't already focused even though it got a mouse down event. This happens easier when always_on_top is true like in the MRP. It doesn't have anything to do with toggling child visibility and is not specific to SplitContainer.

matheusmdx commented 2 weeks ago

Bisecting points to #91361 as the culprit:

image