Introduce Toplevel::frameGeometryChanged signal
ClosedPublic

Authored by zzag on Thu, Jan 23, 10:08 AM.

Details

Summary

Currently we have two signals that are emitted when the Toplevel's geometry
changes - geometryShapeChanged() and geometryChanged(). The former signal
is used primarily to invalidate cached window quads and the latter is
sort of emitted when the frame geometry changes. But it's not that easy. We
have a bunch of connects that link those signals together...

The worst part about all of this is that the window quads cache gets
invalidated every time a geometry update occurs, for example when user
moves a window around on the screen.

This change introduces a new signal and deprecates the existing geometryChanged
signal. frameGeometryChanged is similar to geometryChanged except that it is
emitted when an _actual_ geometry change has occurred.

We do still emit geometryShapeChanged signal. However, in long term, we
need to get rid of this signal or come up with something that makes sense
and doesn't require us to waste computational resources.

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.
zzag created this revision.Thu, Jan 23, 10:08 AM
Restricted Application added a project: KWin. · View Herald TranscriptThu, Jan 23, 10:08 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Thu, Jan 23, 10:08 AM
zzag updated this revision to Diff 74202.Thu, Jan 23, 10:19 AM

s/@deprecated since 5.18/@deprecated since 5.19/

zzag updated this revision to Diff 74209.Thu, Jan 23, 10:56 AM
zzag edited the summary of this revision. (Show Details)

Edit description.

zzag added a comment.Thu, Jan 30, 12:16 PM

If there are no objections, I'm going to land this patch (and other patches that depend on it) in about a week.

zzag planned changes to this revision.Wed, Feb 5, 8:56 AM

Urgh, undesired side-effects can be introduced when the frameGeometryChanged() signal is emitted. We need to handle them properly.

zzag updated this revision to Diff 75040.Wed, Feb 5, 10:58 AM

Handle changes to the visible geometry that occur when frameGeometryChanged() and geometryShapeChanged() are emitted.

davidedmundson accepted this revision.Tue, Feb 11, 3:00 PM
This revision is now accepted and ready to land.Tue, Feb 11, 3:00 PM
This revision was automatically updated to reflect the committed changes.