Skip to content

Commit 5e7592a

Browse files
committed
Merge pull request #95232 from bruvzg/popup_time_up
[PopupMenu] Increase mouse button release timeout and reset it from `post_popup`.
2 parents 031b71f + 460b538 commit 5e7592a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scene/gui/popup_menu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ void PopupMenu::_input_from_window_internal(const Ref<InputEvent> &p_event) {
608608
return;
609609
}
610610
// Disable clicks under a time threshold to avoid selection right when opening the popup.
611-
if (was_during_grabbed_click && OS::get_singleton()->get_ticks_msec() - popup_time_msec < 150) {
611+
if (was_during_grabbed_click && OS::get_singleton()->get_ticks_msec() - popup_time_msec < 400) {
612612
return;
613613
}
614614

@@ -1064,6 +1064,7 @@ void PopupMenu::_notification(int p_what) {
10641064
} break;
10651065

10661066
case NOTIFICATION_POST_POPUP: {
1067+
popup_time_msec = OS::get_singleton()->get_ticks_msec();
10671068
initial_button_mask = Input::get_singleton()->get_mouse_button_mask();
10681069
during_grabbed_click = (bool)initial_button_mask;
10691070
} break;

0 commit comments

Comments
 (0)