D26859: Implement the tablet wayland protocol in kwin

Vlad Zahorodnii noreply at phabricator.kde.org
Thu Jan 23 09:15:30 GMT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200123/251bcda8/attachment-0001.html>


More information about the kwin mailing list