Fixes to "hide mouse on inactivity" (#5476)
The feature wasn't working when the "single window mode" was off. Changed the cursor setting to only affect the render_window and moved to a signal/slot model to show the mouse.
This commit is contained in:
parent
7ae0fc7338
commit
2f5eec3576
4 changed files with 23 additions and 15 deletions
|
@ -297,7 +297,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
|
|||
} else if (event->button() == Qt::RightButton) {
|
||||
InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y());
|
||||
}
|
||||
QWidget::mousePressEvent(event);
|
||||
emit MouseActivity();
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
|
||||
|
@ -308,7 +308,7 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
|
|||
const auto [x, y] = ScaleTouch(pos);
|
||||
this->TouchMoved(x, y);
|
||||
InputCommon::GetMotionEmu()->Tilt(pos.x(), pos.y());
|
||||
QWidget::mouseMoveEvent(event);
|
||||
emit MouseActivity();
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
|
||||
|
@ -319,6 +319,7 @@ void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
|
|||
this->TouchReleased();
|
||||
else if (event->button() == Qt::RightButton)
|
||||
InputCommon::GetMotionEmu()->EndTilt();
|
||||
emit MouseActivity();
|
||||
}
|
||||
|
||||
void GRenderWindow::TouchBeginEvent(const QTouchEvent* event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue