Decorate only toplevel internal clients
ClosedPublic

Authored by zzag on Jun 28 2019, 12:01 PM.

Details

Summary

Unfortunately Aurorae decoration engine creates several internal clients
per each decoration. One of those clients represents QOffscreenSurface,
which is not a toplevel. Given that no QWindow object will be found for
such clients, m_internalWindowFlags contains undefined value.

Luckily, QOffscreenSurface sets FramelessWindowHint flag, but because
InternalClient is not able to find matching QWindow object, cached
QWindow flags won't have that hint set.

Thus InternalClient will attempt to decorate QOffscreenSurface. A new
Aurorae decoration will be created, which means a new QOffscreenSurface
will be created, which means a new Aurorae decoration will be created,
and so on.

This change restricts subset of internal clients that can be decorated.
Only clients with valid m_internalWindow can be decorated. If m_internalWindow
isn't null, then m_internalWindowFlags is guaranteed to be valid as well.

BUG: 407612
FIXED-IN: 5.16.3

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.Jun 28 2019, 12:01 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 28 2019, 12:01 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jun 28 2019, 12:01 PM
zzag edited the summary of this revision. (Show Details)Jun 28 2019, 12:10 PM
zzag updated this revision to Diff 60771.Jun 28 2019, 12:22 PM

Better wording.

davidedmundson accepted this revision.Jun 28 2019, 10:21 PM
This revision is now accepted and ready to land.Jun 28 2019, 10:21 PM
This revision was automatically updated to reflect the committed changes.