[platforms/drm] only enable output on key press not release
Otherwise if powerdevil for example is configured to turn screen off on the power key press, we will turn it right back on when we get key release event. Suggested-by: David Edmundson <kde@davidedmundson.co.uk>
This commit is contained in:
parent
ea4acb5763
commit
b24fc72969
1 changed files with 5 additions and 3 deletions
|
@ -42,9 +42,11 @@ bool DpmsInputEventFilter::wheelEvent(QWheelEvent *event)
|
|||
|
||||
bool DpmsInputEventFilter::keyEvent(QKeyEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
notify();
|
||||
return true;
|
||||
if (event->type() == QKeyEvent::KeyPress) {
|
||||
notify();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
|
||||
|
|
Loading…
Reference in a new issue