Cache the clientSize in DecoratedClientImpl
ClosedPublic

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

Details

Summary

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
changed.

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.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5788.Aug 10 2016, 8:52 AM
graesslin retitled this revision from to Cache the clientSize in DecoratedClientImpl.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptAug 10 2016, 8:52 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
bshah accepted this revision.Aug 10 2016, 8:58 AM
bshah added a reviewer: bshah.
bshah added a subscriber: bshah.

+1, looks good optimization

This revision is now accepted and ready to land.Aug 10 2016, 8:58 AM
This revision was automatically updated to reflect the committed changes.