D26859: Implement the tablet wayland protocol in kwin

Vlad Zahorodnii noreply at phabricator.kde.org
Thu Jan 23 12:30:11 GMT 2020


zzag requested changes to this revision.
zzag added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> input.cpp:1559
> +            struct udev_device * const udev_device = libinput_device_get_udev_device(device->device());
> +            const auto devnode = udev_device_get_devnode(udev_device);
> +            tabletSeat->addTablet(device->vendor(), device->product(), device->sysName(), device->name(), {QString::fromUtf8(devnode)});

Use explicit type

  const char *devnode = udev_device_get_devnode(udev_device);

> input.cpp:1631
> +
> +        KWayland::Server::TabletInterface* tablet = tabletSeat->tabletByName(event->tabletSysName());
> +

Align pointers to right.

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

No short names.

  Toplevel *toplevel = input()->findToplevel(event->globalPos());
  if (!toplevel || !toplevel->surface()) {
      return false;
  }

> input.cpp:1638
> +
> +        KWayland::Server::SurfaceInterface* surface = t->surface();
> +        tool->setCurrentSurface(surface);

Align pointers to right.

> input.cpp:1641-1642
> +
> +        if (!tool->isClientSupported() || !tablet->resourceForSurface(surface))
> +            return emulateTabletEvent(event);
> +

Add missing braces.

> input.cpp:2064-2065
> +        m_tabletSupport = new TabletInputFilter;
> +        for(auto dev : m_libInput->devices())
> +            m_tabletSupport->integrateDevice(dev);
> +        connect(m_libInput, &LibInput::Connection::deviceAdded,

Please put a single space between `for` and the opening parenthesis, add missing braces and use explicit type.

> input_event_spy.cpp:124
>  
> -void InputEventSpy::tabletToolEvent(QTabletEvent *event)
> +void InputEventSpy::tabletToolEvent(TabletEvent* event)
>  {

Align pointers to right.

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/af439976/attachment-0001.html>


More information about the kwin mailing list