Also wake up screens on tablet interactions
BUG:451359 FIXED-IN:6.1.1
This commit is contained in:
parent
f46174453d
commit
c2141dc4ef
2 changed files with 42 additions and 0 deletions
|
@ -129,6 +129,43 @@ bool DpmsInputEventFilter::touchMotion(qint32 id, const QPointF &pos, std::chron
|
|||
return true;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::tabletToolEvent(TabletEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::TabletPress) {
|
||||
// Only wake when the tool is actually pressed down not just hovered over the tablet
|
||||
notify();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, std::chrono::microseconds time)
|
||||
{
|
||||
if (pressed) {
|
||||
notify();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, std::chrono::microseconds time)
|
||||
{
|
||||
if (pressed) {
|
||||
notify();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, std::chrono::microseconds time)
|
||||
{
|
||||
notify();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DpmsInputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, std::chrono::microseconds time)
|
||||
{
|
||||
notify();
|
||||
return true;
|
||||
}
|
||||
|
||||
void DpmsInputEventFilter::notify()
|
||||
{
|
||||
const QList<Output *> outputs = workspace()->outputs();
|
||||
|
|
|
@ -32,6 +32,11 @@ public:
|
|||
bool touchDown(qint32 id, const QPointF &pos, std::chrono::microseconds time) override;
|
||||
bool touchMotion(qint32 id, const QPointF &pos, std::chrono::microseconds time) override;
|
||||
bool touchUp(qint32 id, std::chrono::microseconds time) override;
|
||||
bool tabletToolEvent(TabletEvent *event) override;
|
||||
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, std::chrono::microseconds time) override;
|
||||
bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, std::chrono::microseconds time) override;
|
||||
bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, std::chrono::microseconds time) override;
|
||||
bool tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, std::chrono::microseconds time) override;
|
||||
|
||||
private:
|
||||
void notify();
|
||||
|
|
Loading…
Reference in a new issue