summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-12-14 01:04:07 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-12-14 01:04:07 +0100
commit96579e515a8da3eb6c1aab13a4d4ff5d9577605a (patch)
tree3cdf3667d1bb19d438eff633dee02b59ad5a8391
parentMerge pull request #7574 from v1993/patch-1 (diff)
downloadyuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar.gz
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar.bz2
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar.lz
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar.xz
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.tar.zst
yuzu-96579e515a8da3eb6c1aab13a4d4ff5d9577605a.zip
-rw-r--r--src/yuzu/applets/qt_software_keyboard.cpp23
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() {
row = 0;
column = 0;
- const auto* const curr_button =
- keyboard_buttons[static_cast<int>(bottom_osk_index)][row][column];
+ switch (bottom_osk_index) {
+ case BottomOSKIndex::LowerCase:
+ case BottomOSKIndex::UpperCase: {
+ const auto* const curr_button =
+ keyboard_buttons[static_cast<std::size_t>(bottom_osk_index)][row][column];
+
+ // This is a workaround for setFocus() randomly not showing focus in the UI
+ QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center()));
+ break;
+ }
+ case BottomOSKIndex::NumberPad: {
+ const auto* const curr_button = numberpad_buttons[row][column];
- // This is a workaround for setFocus() randomly not showing focus in the UI
- QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center()));
+ // This is a workaround for setFocus() randomly not showing focus in the UI
+ QCursor::setPos(curr_button->mapToGlobal(curr_button->rect().center()));
+ break;
+ }
+ default:
+ break;
+ }
StartInputThread();
}