Option to hide mouse on inactivity (#5094)
* Add and implement option to hide mouse on iniactivity + clang format * Set mouse hide timeout as a constant * Address review comments, decrease mouse inactivity timeout to 2500ms * Hide mouse: fix menubar bugs squashable * Hide mouse: ensure status bar has the default pointer
This commit is contained in:
parent
d37b0476ad
commit
23921e3203
7 changed files with 77 additions and 0 deletions
|
@ -199,6 +199,8 @@ GRenderWindow::GRenderWindow(QWidget* parent_, EmuThread* emu_thread)
|
|||
setLayout(layout);
|
||||
InputCommon::Init();
|
||||
|
||||
this->setMouseTracking(true);
|
||||
|
||||
GMainWindow* parent = GetMainWindow();
|
||||
connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &GMainWindow::OnLoadComplete);
|
||||
}
|
||||
|
@ -295,6 +297,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
|
|||
} else if (event->button() == Qt::RightButton) {
|
||||
InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y());
|
||||
}
|
||||
QWidget::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
|
||||
|
@ -305,6 +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);
|
||||
}
|
||||
|
||||
void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue