Diffusion KWin eed4bf32ae04

Cache the clientSize in DecoratedClientImpl

Authored by graesslin on Aug 10 2016, 8:48 AM.


Cache the clientSize in DecoratedClientImpl

So far whenever the window geometry changed the widthChanged and
heightChanged signals were emitted even if they did not change.
E.g. while moving a window this resulted in the signal being emitted
after every step, although from decoration point of view nothing

The decoration performed costly tasks like re-layout the window buttons.

With this change the client size is cached and the widthChanged signal
is only emitted if the width actually changed. Same for heightChanged.

This results in the decoration only re-layouting the buttons if the
window is resized horizontally. All other geometry changes no longer
result in a re-layout.

Reviewers: KWin, Plasma

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D2389