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

Reply via email to