From 5ac5c8bc0693465ab5bd8e21adcded10898c1a55 Mon Sep 17 00:00:00 2001 From: MathieuRoux Date: Thu, 18 Aug 2022 11:16:29 +0200 Subject: Fix warp_mouse for transient windows, smoother mouse positioning when releasing mouse for spinbox --- scene/gui/spin_box.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene/gui') diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 517c83545c..ca81a61001 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -105,8 +105,9 @@ void SpinBox::_range_click_timeout() { void SpinBox::_release_mouse() { if (drag.enabled) { drag.enabled = false; - Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); + Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_HIDDEN); warp_mouse(drag.capture_pos); + Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); } } -- cgit v1.2.3