MCPcopy Create free account
hub / github.com/KDE/kwin / tabletToolButtonEvent

Method tabletToolButtonEvent

src/input.cpp:2016–2035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2014 return false;
2015 }
2016 bool tabletToolButtonEvent(TabletToolButtonEvent *event) override
2017 {
2018 Window *window = input()->tablet()->focus();
2019 if (!window || !window->isClient()) {
2020 return false;
2021 }
2022
2023 if (event->pressed) {
2024 if (const auto command = windowActionForTabletButtonPress(event, window)) {
2025 return window->performMousePressCommand(*command, input()->tablet()->position());
2026 }
2027 } else {
2028 const auto command = window->getMouseReleaseCommand(event->button == BTN_STYLUS ? Qt::MiddleButton : Qt::RightButton);
2029 if (command) {
2030 window->performMouseReleaseCommand(*command, input()->tablet()->position());
2031 }
2032 }
2033
2034 return false;
2035 }
2036
2037private:
2038 MouseWheelAccumulator m_accumulator;

Callers

nothing calls this directly

Calls 9

inputFunction · 0.85
tabletMethod · 0.80
focusMethod · 0.45
isClientMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected