mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-26 06:16:24 -04:00
UI: Avoid looping at end of window content
This commit is contained in:
+4
-2
@@ -97,8 +97,10 @@ void update() noexcept {
|
||||
if (auto* context = aurora::rmlui::get_context();
|
||||
context != nullptr && context->GetFocusElement() == nullptr)
|
||||
{
|
||||
if (auto* top = top_document()) {
|
||||
top->focus();
|
||||
for (auto& doc : std::views::reverse(sDocuments)) {
|
||||
if (!doc->closed() && !doc->pending_close() && doc->focus()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user