Commit 6b4fecca authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

tablet: Send libinput timestamp as the time

As it should be done, instead of using some different value from the
local system.
parent e97e5201
......@@ -471,14 +471,14 @@ void Connection::processEvents()
auto *tabletEvent = static_cast<TabletToolButtonEvent *>(event.get());
Q_EMIT event->device()->tabletToolButtonEvent(tabletEvent->buttonId(),
tabletEvent->isButtonPressed(),
createTabletId(tabletEvent->tool(), event->device()->groupUserData()));
createTabletId(tabletEvent->tool(), event->device()->groupUserData()), tabletEvent->time());
break;
}
case LIBINPUT_EVENT_TABLET_PAD_BUTTON: {
auto *tabletEvent = static_cast<TabletPadButtonEvent *>(event.get());
Q_EMIT event->device()->tabletPadButtonEvent(tabletEvent->buttonId(),
tabletEvent->isButtonPressed(),
{event->device()->groupUserData()});
{event->device()->groupUserData()}, tabletEvent->time());
break;
}
case LIBINPUT_EVENT_TABLET_PAD_RING: {
......@@ -487,7 +487,7 @@ void Connection::processEvents()
Q_EMIT event->device()->tabletPadRingEvent(tabletEvent->number(),
tabletEvent->position(),
tabletEvent->source() == LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
{event->device()->groupUserData()});
{event->device()->groupUserData()}, tabletEvent->time());
break;
}
case LIBINPUT_EVENT_TABLET_PAD_STRIP: {
......@@ -495,7 +495,7 @@ void Connection::processEvents()
Q_EMIT event->device()->tabletPadStripEvent(tabletEvent->number(),
tabletEvent->position(),
tabletEvent->source() == LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER,
{event->device()->groupUserData()});
{event->device()->groupUserData()}, tabletEvent->time());
break;
}
default:
......
......@@ -339,6 +339,11 @@ public:
return libinput_event_tablet_tool_get_tool(m_tabletToolEvent);
}
uint32_t time() const
{
return libinput_event_tablet_tool_get_time(m_tabletToolEvent);
}
private:
libinput_event_tablet_tool *m_tabletToolEvent;
};
......@@ -360,6 +365,10 @@ public:
{
return libinput_event_tablet_pad_get_ring_source(m_tabletPadEvent);
}
uint32_t time() const
{
return libinput_event_tablet_pad_get_time(m_tabletPadEvent);
}
private:
libinput_event_tablet_pad *m_tabletPadEvent;
......@@ -382,6 +391,10 @@ public:
{
return libinput_event_tablet_pad_get_strip_source(m_tabletPadEvent);
}
uint32_t time() const
{
return libinput_event_tablet_pad_get_time(m_tabletPadEvent);
}
private:
libinput_event_tablet_pad *m_tabletPadEvent;
......@@ -401,6 +414,10 @@ public:
const auto state = libinput_event_tablet_pad_get_button_state(m_tabletPadEvent);
return state == LIBINPUT_BUTTON_STATE_PRESSED;
}
uint32_t time() const
{
return libinput_event_tablet_pad_get_time(m_tabletPadEvent);
}
private:
libinput_event_tablet_pad *m_tabletPadEvent;
......
......@@ -514,51 +514,55 @@ void DebugConsoleFilter::tabletToolEvent(TabletEvent *event)
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId)
void DebugConsoleFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
{
QString text = s_hr + s_tableStart + tableHeaderRow(i18n("Tablet Tool Button"))
+ tableRow(i18n("Button"), button)
+ tableRow(i18n("Pressed"), pressed)
+ tableRow(i18n("Tablet"), qHash(tabletToolId.m_deviceGroupData))
+ timestampRow(time)
+ s_tableEnd;
m_textEdit->insertHtml(text);
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId)
void DebugConsoleFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
QString text = s_hr + s_tableStart
+ tableHeaderRow(i18n("Tablet Pad Button"))
+ tableRow(i18n("Button"), button)
+ tableRow(i18n("Pressed"), pressed)
+ tableRow(i18n("Tablet"), qHash(tabletPadId.data))
+ timestampRow(time)
+ s_tableEnd;
m_textEdit->insertHtml(text);
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
void DebugConsoleFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
QString text = s_hr + s_tableStart + tableHeaderRow(i18n("Tablet Pad Strip"))
+ tableRow(i18n("Number"), number)
+ tableRow(i18n("Position"), position)
+ tableRow(i18n("isFinger"), isFinger)
+ tableRow(i18n("Tablet"), qHash(tabletPadId.data))
+ timestampRow(time)
+ s_tableEnd;
m_textEdit->insertHtml(text);
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
void DebugConsoleFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
QString text = s_hr + s_tableStart + tableHeaderRow(i18n("Tablet Pad Ring"))
+ tableRow(i18n("Number"), number)
+ tableRow(i18n("Position"), position)
+ tableRow(i18n("isFinger"), isFinger)
+ tableRow(i18n("Tablet"), qHash(tabletPadId.data))
+ timestampRow(time)
+ s_tableEnd;
m_textEdit->insertHtml(text);
......
......@@ -153,10 +153,10 @@ public:
void switchEvent(SwitchEvent *event) override;
void tabletToolEvent(TabletEvent *event) override;
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId) override;
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId) override;
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override;
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override;
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override;
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override;
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override;
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override;
private:
QTextEdit *m_textEdit;
......
......@@ -731,8 +731,9 @@ bool EffectsHandlerImpl::tabletToolEvent(TabletEvent *event)
return false;
}
bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId)
bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletToolButtonEvent(button, pressed, tabletToolId.m_uniqueId)) {
......@@ -742,8 +743,9 @@ bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const
return false;
}
bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId)
bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadButtonEvent(button, pressed, tabletPadId.data)) {
......@@ -753,8 +755,9 @@ bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const T
return false;
}
bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadStripEvent(number, position, isFinger, tabletPadId.data)) {
......@@ -764,8 +767,9 @@ bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFi
return false;
}
bool EffectsHandlerImpl::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
bool EffectsHandlerImpl::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadRingEvent(number, position, isFinger, tabletPadId.data)) {
......
......@@ -225,10 +225,10 @@ public:
bool touchUp(qint32 id, quint32 time);
bool tabletToolEvent(KWin::TabletEvent *event);
bool tabletToolButtonEvent(uint button, bool pressed, const KWin::TabletToolId &tabletToolId);
bool tabletPadButtonEvent(uint button, bool pressed, const KWin::TabletPadId &tabletPadId);
bool tabletPadStripEvent(int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId);
bool tabletPadRingEvent(int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId);
bool tabletToolButtonEvent(uint button, bool pressed, const KWin::TabletToolId &tabletToolId, uint time);
bool tabletPadButtonEvent(uint button, bool pressed, const KWin::TabletPadId &tabletPadId, uint time);
bool tabletPadStripEvent(int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId, uint time);
bool tabletPadRingEvent(int number, int position, bool isFinger, const KWin::TabletPadId &tabletPadId, uint time);
void highlightWindows(const QVector<EffectWindow *> &windows);
......
......@@ -239,37 +239,41 @@ bool InputEventFilter::tabletToolEvent(TabletEvent *event)
return false;
}
bool InputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletId)
bool InputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId)
bool InputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
bool InputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
bool InputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
......@@ -620,33 +624,33 @@ public:
}
return static_cast<EffectsHandlerImpl *>(effects)->tabletToolEvent(event);
}
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId) override
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
{
if (!effects) {
return false;
}
return static_cast<EffectsHandlerImpl *>(effects)->tabletToolButtonEvent(button, pressed, tabletToolId);
return static_cast<EffectsHandlerImpl *>(effects)->tabletToolButtonEvent(button, pressed, tabletToolId, time);
}
bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId) override
bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
{
if (!effects) {
return false;
}
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadButtonEvent(button, pressed, tabletPadId);
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadButtonEvent(button, pressed, tabletPadId, time);
}
bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override
bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
if (!effects) {
return false;
}
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadStripEvent(number, position, isFinger, tabletPadId);
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadStripEvent(number, position, isFinger, tabletPadId, time);
}
bool tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override
bool tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
if (!effects) {
return false;
}
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadRingEvent(number, position, isFinger, tabletPadId);
return static_cast<EffectsHandlerImpl *>(effects)->tabletPadRingEvent(number, position, isFinger, tabletPadId, time);
}
};
......@@ -2296,8 +2300,9 @@ public:
return true;
}
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId) override
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
{
Q_UNUSED(time)
KWaylandServer::TabletSeatV2Interface *tabletSeat = findTabletSeat();
auto tool = tabletSeat->toolByHardwareSerial(tabletToolId.m_serialId, getType(tabletToolId));
if (!tool) {
......@@ -2328,17 +2333,17 @@ public:
return pad;
}
bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId) override
bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
{
auto pad = findAndAdoptPad(tabletPadId);
if (!pad) {
return false;
}
pad->sendButton(QDateTime::currentMSecsSinceEpoch(), button, pressed);
pad->sendButton(time, button, pressed);
return true;
}
bool tabletPadRingEvent(int number, int angle, bool isFinger, const TabletPadId &tabletPadId) override
bool tabletPadRingEvent(int number, int angle, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
auto pad = findAndAdoptPad(tabletPadId);
if (!pad) {
......@@ -2350,11 +2355,11 @@ public:
if (isFinger) {
ring->sendSource(KWaylandServer::TabletPadRingV2Interface::SourceFinger);
}
ring->sendFrame(QDateTime::currentMSecsSinceEpoch());
ring->sendFrame(time);
return true;
}
bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override
bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
auto pad = findAndAdoptPad(tabletPadId);
if (!pad) {
......@@ -2366,7 +2371,7 @@ public:
if (isFinger) {
strip->sendSource(KWaylandServer::TabletPadStripV2Interface::SourceFinger);
}
strip->sendFrame(QDateTime::currentMSecsSinceEpoch());
strip->sendFrame(time);
return true;
}
......@@ -2688,16 +2693,18 @@ public:
update();
}
void tabletPadButtonEvent(uint, bool pressed, const KWin::TabletPadId &) override
void tabletPadButtonEvent(uint, bool pressed, const KWin::TabletPadId &, uint time) override
{
Q_UNUSED(time)
if (!pressed) {
return;
}
update();
}
void tabletToolButtonEvent(uint, bool pressed, const KWin::TabletToolId &) override
void tabletToolButtonEvent(uint, bool pressed, const KWin::TabletToolId &, uint time) override
{
Q_UNUSED(time)
if (!pressed) {
return;
}
......@@ -2838,34 +2845,38 @@ public:
Q_UNUSED(event)
notifyActivity();
}
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId) override
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletToolId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId) override
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId) override
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}
......
......@@ -432,10 +432,10 @@ public:
virtual bool switchEvent(SwitchEvent *event);
virtual bool tabletToolEvent(TabletEvent *event);
virtual bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId);
virtual bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId);
virtual bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
virtual bool tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
virtual bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time);
virtual bool tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time);
virtual bool tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
virtual bool tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
protected:
void passToWaylandServer(QKeyEvent *event);
......
......@@ -131,33 +131,37 @@ void InputEventSpy::tabletToolEvent(TabletEvent *event)
Q_UNUSED(event)
}
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId)
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletToolId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId)
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
}
......@@ -81,10 +81,10 @@ public:
virtual void switchEvent(SwitchEvent *event);
virtual void tabletToolEvent(TabletEvent *event);
virtual void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId);
virtual void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId);
virtual void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
virtual void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
virtual void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time);
virtual void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time);
virtual void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
virtual void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
};
} // namespace KWin
......
......@@ -73,11 +73,11 @@ Q_SIGNALS:
void tabletToolEvent(InputRedirection::TabletEventType type, const QPointF &pos,
qreal pressure, int xTilt, int yTilt, qreal rotation, bool tipDown,
bool tipNear, const TabletToolId &tabletToolId, quint32 time);
void tabletToolButtonEvent(uint button, bool isPressed, const TabletToolId &tabletToolId);
void tabletToolButtonEvent(uint button, bool isPressed, const TabletToolId &tabletToolId, quint32 time);
void tabletPadButtonEvent(uint button, bool isPressed, const TabletPadId &tabletPadId);
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
void tabletPadButtonEvent(uint button, bool isPressed, const TabletPadId &tabletPadId, uint time);
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
};
} // namespace KWin
......@@ -89,42 +89,42 @@ void TabletInputRedirection::tabletToolEvent(KWin::InputRedirection::TabletEvent
}
void KWin::TabletInputRedirection::tabletToolButtonEvent(uint button, bool isPressed,
const TabletToolId &tabletToolId)
const TabletToolId &tabletToolId, uint time)
{
input()->processSpies(std::bind(&InputEventSpy::tabletToolButtonEvent,
std::placeholders::_1, button, isPressed, tabletToolId));
std::placeholders::_1, button, isPressed, tabletToolId, time));
input()->processFilters(std::bind(&InputEventFilter::tabletToolButtonEvent,
std::placeholders::_1, button, isPressed, tabletToolId));
std::placeholders::_1, button, isPressed, tabletToolId, time));
input()->setLastInputHandler(this);
}
void KWin::TabletInputRedirection::tabletPadButtonEvent(uint button, bool isPressed,
const TabletPadId &tabletPadId)
const TabletPadId &tabletPadId, uint time)
{
input()->processSpies(std::bind(&InputEventSpy::tabletPadButtonEvent,
std::placeholders::_1, button, isPressed, tabletPadId));
std::placeholders::_1, button, isPressed, tabletPadId, time));
input()->processFilters(std::bind(&InputEventFilter::tabletPadButtonEvent,
std::placeholders::_1, button, isPressed, tabletPadId));
std::placeholders::_1, button, isPressed, tabletPadId, time));
input()->setLastInputHandler(this);
}
void KWin::TabletInputRedirection::tabletPadStripEvent(int number, int position, bool isFinger,
const TabletPadId &tabletPadId)
const TabletPadId &tabletPadId, uint time)
{
input()->processSpies(std::bind(&InputEventSpy::tabletPadStripEvent,
std::placeholders::_1, number, position, isFinger, tabletPadId));
std::placeholders::_1, number, position, isFinger, tabletPadId, time));
input()->processFilters(std::bind(&InputEventFilter::tabletPadStripEvent,
std::placeholders::_1, number, position, isFinger, tabletPadId));
std::placeholders::_1, number, position, isFinger, tabletPadId, time));
input()->setLastInputHandler(this);
}
void KWin::TabletInputRedirection::tabletPadRingEvent(int number, int position, bool isFinger,
const TabletPadId &tabletPadId)
const TabletPadId &tabletPadId, uint time)
{
input()->processSpies(std::bind(&InputEventSpy::tabletPadRingEvent,
std::placeholders::_1, number, position, isFinger, tabletPadId));
std::placeholders::_1, number, position, isFinger, tabletPadId, time));
input()->processFilters(std::bind(&InputEventFilter::tabletPadRingEvent,
std::placeholders::_1, number, position, isFinger, tabletPadId));
std::placeholders::_1, number, position, isFinger, tabletPadId, time));
input()->setLastInputHandler(this);
}
......
......@@ -45,11 +45,11 @@ public:
qreal pressure, int xTilt, int yTilt, qreal rotation, bool tipDown,
bool tipNear, const TabletToolId &tabletToolId,
quint32 time);
void tabletToolButtonEvent(uint button, bool isPressed, const TabletToolId &tabletToolId);
void tabletToolButtonEvent(uint button, bool isPressed, const TabletToolId &tabletToolId, uint time);
void tabletPadButtonEvent(uint button, bool isPressed, const TabletPadId &tabletPadId);
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId);
void tabletPadButtonEvent(uint button, bool isPressed, const TabletPadId &tabletPadId, uint time);
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time);
bool positionValid() const override
{
......