D22767: Calculate first clickable point, from the top-left

David Edmundson noreply at phabricator.kde.org
Mon Jul 29 10:42:55 BST 2019


davidedmundson added a comment.


  Thanks for doing some work on xembedsniproxy!

INLINE COMMENTS

> sniproxy.cpp:239
>  
> +    calculateClickPoint(image);
> +

This is quite expensive to do every frame (some animate), I think we can do something else, see below.

> sniproxy.cpp:530
>  	else
> -	    configVals[0] = static_cast<uint32_t>(x);
> +	    configVals[0] = static_cast<uint32_t>(x - m_clickPoint.x());
>  	if (pointer->root_y > y + clientGeom->height)

I don't think clickpoint has to be a member variable, we only use it within the context of this method.

We can make it a local variable evaluated within sendClick. Relative to frame updates, clicks are quite rare.

> sniproxy.cpp:551
>          event->root = QX11Info::appRootWindow();
>          event->root_x = x;
>          event->root_y = y;

+ m_clickPoint ?

REPOSITORY
  R120 Plasma Workspace

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

To: kmaterka, #plasma_workspaces
Cc: davidedmundson, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190729/2bf18024/attachment-0001.html>


More information about the Plasma-devel mailing list