1
0
Fork 0

Fix dec7ff6b0c: Dropdowns would close if their tooltip appeared. (#10939)

Solution is to not focus any tooltips, so that the dropdown doesn't lose focus. Tooltips don't accept any input so this does not change their behaviour.
pull/10810/head
PeterN 2023-06-04 19:15:24 +01:00 committed by GitHub
parent bfcb027cb9
commit 83a318edcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -457,6 +457,9 @@ void SetFocusedWindow(Window *w)
{ {
if (_focused_window == w) return; if (_focused_window == w) return;
/* Don't focus a tooltip */
if (w != nullptr && w->window_class == WC_TOOLTIPS) return;
/* Invalidate focused widget */ /* Invalidate focused widget */
if (_focused_window != nullptr) { if (_focused_window != nullptr) {
if (_focused_window->nested_focus != nullptr) _focused_window->nested_focus->SetDirty(_focused_window); if (_focused_window->nested_focus != nullptr) _focused_window->nested_focus->SetDirty(_focused_window);