Drop unnecessary fields in TabletInputRedirection

They are not strictly needed, also it seems like the value of "button"
is incorrectly initialized when processing a tip down event.
wilder/Plasma/6.3
Vlad Zahorodnii 1 year ago
parent a28094bae3
commit da63b47719
  1. 5
      src/tablet_input.cpp
  2. 3
      src/tablet_input.h

@ -231,7 +231,7 @@ void TabletInputRedirection::tabletToolEvent(KWin::InputDevice::TabletEventType
update();
workspace()->setActiveOutput(pos);
const auto button = m_tipDown ? Qt::LeftButton : Qt::NoButton;
const auto button = tipDown ? Qt::LeftButton : Qt::NoButton;
// TODO: Not correct, but it should work fine. In long term, we need to stop using QTabletEvent.
const QPointingDevice *dev = QPointingDevice::primaryPointingDevice();
@ -246,9 +246,6 @@ void TabletInputRedirection::tabletToolEvent(KWin::InputDevice::TabletEventType
input()->processSpies(std::bind(&InputEventSpy::tabletToolEvent, std::placeholders::_1, &ev));
input()->processFilters(
std::bind(&InputEventFilter::tabletToolEvent, std::placeholders::_1, &ev));
m_tipDown = tipDown;
m_tipNear = tipNear;
}
void KWin::TabletInputRedirection::tabletToolButtonEvent(uint button, bool isPressed, InputDeviceTabletTool *tool, std::chrono::microseconds time, InputDevice *device)

@ -73,9 +73,6 @@ private:
void trackNextOutput();
void ensureTabletTool(InputDeviceTabletTool *tool);
bool m_tipDown = false;
bool m_tipNear = false;
QPointF m_lastPosition;
QMetaObject::Connection m_decorationGeometryConnection;
QMetaObject::Connection m_decorationDestroyedConnection;

Loading…
Cancel
Save