D7038: [server] Respect input region of sub-surfaces on pointer surface focus

David Edmundson noreply at phabricator.kde.org
Thu Sep 27 22:20:24 BST 2018


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


  I've written you a unit test.
  
  I can either take over this or upload as a separate review that you can merge in.

INLINE COMMENTS

> zzag wrote in surface_interface.cpp:819
> So, it would be fine to return `true` in the following case:
> 
>   QRectF(QPoint(0, 0), QSize(10, 10)).contains(QPointF(10, 10));
> 
> ?

I would have said so.

But then it means sizeContains and inputContains behave differently as

QRegion(QRect(0,0,10,10)).contains(10,10);  returns false

which gives us some inconsistency.

> surface_interface.cpp:824
>  {
> -    if (!isMapped()) {
> +    return sizeContains(size, QRegion(), position) && input.contains(position.toPoint());
> +}

This needs to be

&& (surface.inputIsInfinite() || input.contains(..))

which means either an extra arg in our function pointer or go back to the frankly simpler first revision. Writing N complex lines to save duplicating N simple lines doesn't make much sense to me, especially when they end up deviating.

REPOSITORY
  R127 KWayland

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

To: romangg, #frameworks, graesslin, davidedmundson
Cc: davidedmundson, zzag, kde-frameworks-devel, graesslin, plasma-devel, ragreen, Pitel, schernikov, michaelh, ZrenBot, ngraham, bruns, alexeymin, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180927/f9615fc8/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list