D26859: Implement the tablet wayland protocol in kwin

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag requested changes to this revision.
zzag added a comment.
This revision now requires changes to proceed.


  Good stuff! There are a couple of coding style issues.

INLINE COMMENTS

> mock_libinput.h:108
>      bool setClickMethodReturnValue = 0;
> +    uint32_t num_buttons = 0;
> +    uint32_t num_strips = 0;

I know that you want to match `libinput_device_tablet_pad_get_{value}`, but please follow coding style.

  uint32_t buttonCount = 0;

> input.cpp:1550
> +        }
> +        auto manager = server->tabletManager();
> +        return manager->seat(findSeat());

No `auto`.

https://community.kde.org/Policies/Library_Code_Policy#auto_Keyword

> input.cpp:1633
> +
> +        Toplevel *t = input()->findToplevel(event->globalPos());
> +        if (!t || !t->surface())

No short names.

  Toplevel *toplevel = ...

> input.cpp:1634-1635
> +        Toplevel *t = input()->findToplevel(event->globalPos());
> +        if (!t || !t->surface())
> +            return false;
> +

Should have braces.

> input_event.h:183
> +    TabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
> +                 int device, int pointerType, qreal pressure, int xTilt, int yTilt,
> +                 qreal tangentialPressure, qreal rotation, int z,

It's off by a single space.

> input_event_spy.h:89
>  
> -    virtual void tabletToolEvent(QTabletEvent *event);
> +    virtual void tabletToolEvent(TabletEvent* event);
>      virtual void tabletToolButtonEvent(const QSet<uint> &pressedButtons);

Align pointers and reference to right.

> connection.cpp:510-512
> +//                 case LIBINPUT_TABLET_TOOL_TYPE_TOTEM:
> +//                     toolType = InputRedirection::Totem;
> +//                     break;

Please don't submit commented code unless there is a reason.

REPOSITORY
  R108 KWin

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

To: apol, #kwin, #plasma, zzag
Cc: zzag, kwin, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.