D15464: [server] Touch drag support

David Edmundson noreply at phabricator.kde.org
Wed Sep 12 21:49:40 BST 2018


davidedmundson added inline comments.

INLINE COMMENTS

> datadevice_interface.cpp:102
>  {
>      // TODO: allow touch
> +    const bool pointerGrab = seat->hasImplicitPointerGrab(serial) && seat->focusedPointerSurface() == origin;

done

> seat_interface.cpp:1331
>      Q_D();
> -    const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.last() + 1;
> +    const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.size();
>      const qint32 serial = display()->nextSerial();

If I add 2 IDs

[0,1]

then remove ID 0

[1]

with the old code I would  get the ID 2, with this I'll get a second ID 1

> seat_interface.cpp:1358
>      const qint32 serial = display()->nextSerial();
> +    if (d->drag.mode == Private::Drag::Mode::Touch &&
> +            d->drag.source->dragImplicitGrabSerial() == d->globalTouch.ids.value(id)) {

I expect you need this in touchCancel too

> seat_interface_p.h:153
>          Focus focus;
> -        QVector<qint32> ids;
> +        QMap<qint32, quint32> ids;
>      };

If you don't need the order QHash over QMap

REPOSITORY
  R127 KWayland

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

To: romangg, #kwin, #frameworks
Cc: davidedmundson, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180912/cb5c5140/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list