D25663: Initial support for tablets on Wayland

Roman Gilg noreply at phabricator.kde.org
Sun Dec 1 22:50:29 GMT 2019


romangg requested changes to this revision.
romangg added a comment.
This revision now requires changes to proceed.


  - I suppose this is related to T11660 <https://phabricator.kde.org/T11660>? If so relate the diff and the object.
  - Improve commit message, explain your future steps.
  - For touch events we already have a fallback to pointer events in KWayland in case the client does not support touch events. I would prefer that we follow the same pattern with tablet events. Otherwise argue why a input event filter is better suited in this case.
  - Adhere to styling rules. From what I have seen:
    - Line length
    - Brackets
    - Enum definition
  - libinput interfacing code looks good

INLINE COMMENTS

> input.cpp:1540
> +
> +        auto id = event->uniqueId();
> +        switch (event->type()) {

unused

> input.cpp:1563
> +private:
> +    PointerInputRedirection *m_pointer;
> +};

There is a `input()->pointer()` getter. Remove member variable.

> connection.cpp:471
> +
> +                KWin::InputRedirection::TabletEventType t;
> +                switch (event->type()) {

Do not use single letter variable names. Minimum two letters. Same below with `e`.

> events.h:220
> +//     qreal sizeMajor() const { return libinput_event_tablet_tool_get_size_major(m_tabletToolEvent); }
> +//     qreal sizeMinor() const { return libinput_event_tablet_tool_get_size_minor(m_tabletToolEvent); }
> +    qreal wheelDelta() const { return libinput_event_tablet_tool_get_wheel_delta(m_tabletToolEvent); }

Implement or add a notice why these are commented out / a TODO.

> pointer_input.h:60
>  
> +uint32_t qtMouseButtonToButton(Qt::MouseButton button);
> +

Change to hash and getter in separate patch. Under the assumption we keep the new input event filter this needs to go into input.h/input.cpp or some other device-independent file and not anymore in pointer_input.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D25663

To: apol, #plasma, #kwin, romangg
Cc: romangg, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191201/5c98dc85/attachment.html>


More information about the kwin mailing list