diff options
| -rw-r--r-- | src/yuzu/applets/qt_software_keyboard.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp index de7f98c4f..c3857fc98 100644 --- a/src/yuzu/applets/qt_software_keyboard.cpp +++ b/src/yuzu/applets/qt_software_keyboard.cpp | |||
| @@ -475,11 +475,26 @@ void QtSoftwareKeyboardDialog::open() { | |||
| 475 | row = 0; | 475 | row = 0; |
| 476 | column = 0; | 476 | column = 0; |
| 477 | 477 | ||
| 478 | const auto* const curr_button = | 478 | switch (bottom_osk_index) { |
| 479 | keyboard_buttons[static_cast<int>(bottom_osk_index)][row][column]; | 479 | case BottomOSKIndex::LowerCase: |
| 480 | case BottomOSKIndex::UpperCase: { | ||
| 481 | const auto* const curr_button = | ||
| 482 | keyboard_buttons[static_cast<std::size_t>(bottom_osk_index)][row][column]; | ||
| 483 | |||
| 484 | // This is a workaround for setFocus() randomly not showing focus in the UI | ||
| 485 | QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center())); | ||
| 486 | break; | ||
| 487 | } | ||
| 488 | case BottomOSKIndex::NumberPad: { | ||
| 489 | const auto* const curr_button = numberpad_buttons[row][column]; | ||
| 480 | 490 | ||
| 481 | // This is a workaround for setFocus() randomly not showing focus in the UI | 491 | // This is a workaround for setFocus() randomly not showing focus in the UI |
| 482 | QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center())); | 492 | QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center())); |
| 493 | break; | ||
| 494 | } | ||
| 495 | default: | ||
| 496 | break; | ||
| 497 | } | ||
| 483 | 498 | ||
| 484 | StartInputThread(); | 499 | StartInputThread(); |
| 485 | } | 500 | } |