Fix audio focus issue by tracking the cause of lost focus.

Fixes #21643
This commit is contained in:
Henrik Rydgård committed 2026-05-06 00:06:32 +02:00
1 parent d4bd7c604c
commit 3a599c4714
16 files changed
+95 -70

No files matched your search

+2 -2
View File
@@ -266,10 +266,10 @@ void ViewGroup::Update() {
}
}
bool ViewGroup::SetFocus() {
bool ViewGroup::SetFocus(FocusFlags cause) {
if (!CanBeFocused() && !views_.empty()) {
for (View *view : views_) {
if (view->SetFocus())
if (view->SetFocus(cause))
return true;
}
}