diff options
author | Daniel Lundqvist <luda09yl@student.hj.se> | 2014-12-26 19:42:27 +0100 |
---|---|---|
committer | Daniel Lundqvist <luda09yl@student.hj.se> | 2014-12-26 19:42:27 +0100 |
commit | ba4ca041f4be1285185a56ba37ae2023c27a326b (patch) | |
tree | 8b8fcf42e095a133781679ddbb1d4ea8d2b519f2 /src/citra_qt/main.cpp | |
parent | Allow focus on the Qt render widget (diff) | |
download | yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar.gz yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar.bz2 yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar.lz yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar.xz yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.tar.zst yuzu-ba4ca041f4be1285185a56ba37ae2023c27a326b.zip |
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r-- | src/citra_qt/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 9fc8705e6..37d69ac13 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -170,7 +170,13 @@ void GMainWindow::BootGame(std::string filename) render_window->GetEmuThread().start(); render_window->show(); - render_window->setFocus(); + + // Allow manually setting focus to the render widget if not using popout mode. + if (!ui.action_Popout_Window_Mode->isChecked()) { + render_window->setFocusPolicy(Qt::ClickFocus); + render_window->setFocus(); + } + OnStartGame(); } @@ -231,12 +237,15 @@ void GMainWindow::ToggleWindowMode() render_window->setParent(nullptr); render_window->setVisible(true); render_window->RestoreGeometry(); + render_window->setFocusPolicy(Qt::NoFocus); } else if (!enable && render_window->parent() == nullptr) { render_window->BackupGeometry(); ui.horizontalLayout->addWidget(render_window); render_window->setVisible(true); + render_window->setFocusPolicy(Qt::ClickFocus); + render_window->setFocus(); } } |