summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-07 12:07:57 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-07 12:07:57 +0200
commit5e7592a342ada6d170c9b5f079b7ac4551c16388 (patch)
treee7fe61b51c96e1fa5a18adc0698604ce58c64451 /scene
parent031b71f5bc8bd41d1318d81191076fbb696f46d7 (diff)
parent460b538746c98fc1a6ae565e415726546ae35174 (diff)
downloadredot-engine-5e7592a342ada6d170c9b5f079b7ac4551c16388.tar.gz
Merge pull request #95232 from bruvzg/popup_time_up
[PopupMenu] Increase mouse button release timeout and reset it from `post_popup`.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/popup_menu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index f62421061b..443fe4774a 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -608,7 +608,7 @@ void PopupMenu::_input_from_window_internal(const Ref<InputEvent> &p_event) {
return;
}
// Disable clicks under a time threshold to avoid selection right when opening the popup.
- if (was_during_grabbed_click && OS::get_singleton()->get_ticks_msec() - popup_time_msec < 150) {
+ if (was_during_grabbed_click && OS::get_singleton()->get_ticks_msec() - popup_time_msec < 400) {
return;
}
@@ -1064,6 +1064,7 @@ void PopupMenu::_notification(int p_what) {
} break;
case NOTIFICATION_POST_POPUP: {
+ popup_time_msec = OS::get_singleton()->get_ticks_msec();
initial_button_mask = Input::get_singleton()->get_mouse_button_mask();
during_grabbed_click = (bool)initial_button_mask;
} break;