Small fixes to "Option to hide mouse on inactivity" (#5280)

* Menubar: fix mouse tracking bug

* citra_qt: Fix copy/paste error
This commit is contained in:
Vitor K 2020-05-04 07:33:02 -03:00 committed by GitHub
parent e9819b61a6
commit 36809b2e2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -299,7 +299,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
} else if (event->button() == Qt::RightButton) { } else if (event->button() == Qt::RightButton) {
InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y()); InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y());
} }
QWidget::mouseMoveEvent(event); QWidget::mousePressEvent(event);
} }
void GRenderWindow::mouseMoveEvent(QMouseEvent* event) { void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {

View file

@ -1013,7 +1013,6 @@ void GMainWindow::BootGame(const QString& filename) {
mouse_hide_timer.start(); mouse_hide_timer.start();
setMouseTracking(true); setMouseTracking(true);
ui.centralwidget->setMouseTracking(true); ui.centralwidget->setMouseTracking(true);
ui.menubar->setMouseTracking(true);
} }
// show and hide the render_window to create the context // show and hide the render_window to create the context
@ -1116,7 +1115,6 @@ void GMainWindow::ShutdownGame() {
setMouseTracking(false); setMouseTracking(false);
ui.centralwidget->setMouseTracking(false); ui.centralwidget->setMouseTracking(false);
ui.menubar->setMouseTracking(false);
// Disable status bar updates // Disable status bar updates
status_bar_update_timer.stop(); status_bar_update_timer.stop();
@ -1713,12 +1711,10 @@ void GMainWindow::OnConfigure() {
if (UISettings::values.hide_mouse && emulation_running) { if (UISettings::values.hide_mouse && emulation_running) {
setMouseTracking(true); setMouseTracking(true);
ui.centralwidget->setMouseTracking(true); ui.centralwidget->setMouseTracking(true);
ui.menubar->setMouseTracking(true);
mouse_hide_timer.start(); mouse_hide_timer.start();
} else { } else {
setMouseTracking(false); setMouseTracking(false);
ui.centralwidget->setMouseTracking(false); ui.centralwidget->setMouseTracking(false);
ui.menubar->setMouseTracking(false);
} }
} else { } else {
Settings::values.input_profiles = old_input_profiles; Settings::values.input_profiles = old_input_profiles;