Fix 8c58fb1efd: Doubled beep sounds when clicking toolbar buttons.

* ShowDropDownList() now issues a beep, so individual toolbar buttons no longer need to do it.
* HandleButtonClick() may be called twice for some buttons, as it is called by automatically for PUSH buttons.

This caused some beeps to sound louder than others.
This commit is contained in:
Peter Nelson
2025-09-21 01:00:20 +01:00
committed by dP
parent c606a3e630
commit 83bd4b6d0f
2 changed files with 3 additions and 14 deletions

View File

@@ -603,6 +603,9 @@ EventState Window::OnHotkey(int hotkey)
*/
void Window::HandleButtonClick(WidgetID widget)
{
/* Button click for this widget may already have been handled. */
if (this->IsWidgetLowered(widget) && this->timeout_timer == TIMEOUT_DURATION) return;
this->LowerWidget(widget);
this->SetTimeout();
this->SetWidgetDirty(widget);