Re-enable text input when selecting a text box if OSK was dismissed

This commit is contained in:
elasota
2020-11-03 18:37:31 -05:00
parent e727e462d8
commit 02bccda8a0
2 changed files with 8 additions and 0 deletions

View File

@@ -2022,6 +2022,11 @@ void GpDisplayDriver_SDL_GL2::Run()
SDL_StopTextInput();
}
// Handle dismissal of on-screen keyboard
const bool isTextInputActuallyActive = SDL_IsTextInputActive();
m_textInputEnabled = isTextInputActuallyActive;
m_properties.m_systemServices->SetTextInputEnabled(isTextInputActuallyActive);
GpDisplayDriverTickStatus_t tickStatus = PresentFrameAndSync();
if (tickStatus == GpDisplayDriverTickStatuses::kFatalFault || tickStatus == GpDisplayDriverTickStatuses::kApplicationTerminated)
{

View File

@@ -781,6 +781,9 @@ namespace PortabilityLayer
if (mouseEvent.m_eventType == GpMouseEventTypes::kUp)
{
// Re-enable text input if it was dismissed
PortabilityLayer::HostSystemServices::GetInstance()->SetTextInputEnabled(true);
m_caratScrollLocked = false;
m_isDraggingSelection = false;
return WidgetHandleStates::kDigested;