diff options
Diffstat (limited to '')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 3 | ||||
-rw-r--r-- | src/citra_qt/main.cpp | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index d44ddb096..6d08d6afc 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -123,9 +123,6 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); setWindowTitle(QString::fromStdString(window_title)); - // Allow manually setting focus to the widget. - setFocusPolicy(Qt::ClickFocus); - keyboard_id = KeyMap::NewDeviceId(); ReloadSetKeymaps(); 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(); } } |