mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
ui: ignore tap to wake device (#28656)
revert to first version old-commit-hash: 5df45dcef4a384ad059b1df385a119b66dcf4477
This commit is contained in:
@@ -79,16 +79,20 @@ void MainWindow::closeSettings() {
|
||||
}
|
||||
|
||||
bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
|
||||
bool ignore = false;
|
||||
switch (event->type()) {
|
||||
case QEvent::TouchBegin:
|
||||
case QEvent::TouchUpdate:
|
||||
case QEvent::TouchEnd:
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseMove:
|
||||
case QEvent::MouseMove: {
|
||||
// ignore events when device is awakened by resetInteractiveTimout
|
||||
ignore = !uiState()->awake;
|
||||
device.resetInteractiveTimout();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
return ignore;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user