From e8b54842f27cb776add3c82545ff2775e5e84d01 Mon Sep 17 00:00:00 2001 From: thecozies <79979276+thecozies@users.noreply.github.com> Date: Wed, 1 May 2024 10:17:16 -0500 Subject: [PATCH] only force prompt focus if mouse is not active --- src/ui/ui_renderer.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ui/ui_renderer.cpp b/src/ui/ui_renderer.cpp index bd18269..5fa4288 100644 --- a/src/ui/ui_renderer.cpp +++ b/src/ui/ui_renderer.cpp @@ -1055,13 +1055,15 @@ struct UIContext { Rml::Element* focused = current_document->GetFocusLeafNode(); // Check if unfocused or current focus isn't either prompt button - if ( - focused == nullptr || ( - focused != current_document->GetElementById("prompt__cancel-button") && - focused != current_document->GetElementById("prompt__confirm-button") - ) - ) { - ctx->shouldFocus = true; + if (mouse_is_active == false) { + if ( + focused == nullptr || ( + focused != current_document->GetElementById("prompt__cancel-button") && + focused != current_document->GetElementById("prompt__confirm-button") + ) + ) { + ctx->shouldFocus = true; + } } if (!ctx->shouldFocus) {