Try to invalidate quad cache when shadow is changed
ClosedPublic

Authored by zzag on Nov 28 2018, 1:57 PM.

Details

Summary

213239a0ea0a9c0967bb68d1eda7a8d4d6a09498 tried to address the case when
a wayland client gets shadow after it was mapped, but because of poor
testing from my side, another bug was introduced. If a decoration tooltip
or the user actions popup is shown, then in some cases it can be blank.

Usually, SurfaceInterface::shadowChanged proceeds SurfaceInterface::sizeChanged,
so when the shadow is installed, window quads cache is rebuilt. But
because shell client already knows the geometry of the internal client,
goemetryShapeChanged is not emitted, thus the cache is not updated.

It would be better just to invalidate the cache when the shadow is
installed, uninstalled, or updated. This reduces the number of
unnecessary invocations of Scene::Window::buildQuads and also moves
handling of the window quads cache away from the Shadow class.

BUG: 399490
FIXED-IN: 5.15.0

Test Plan

Decoration tooltips are no longer blank.

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.Nov 28 2018, 1:57 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 28 2018, 1:57 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Nov 28 2018, 1:57 PM
zzag edited the summary of this revision. (Show Details)Nov 28 2018, 2:01 PM
zzag edited the summary of this revision. (Show Details)
zzag added a subscriber: graesslin.Nov 28 2018, 2:11 PM

@graesslin May I ask your advice?

seems sensible to me ++

davidedmundson accepted this revision.Dec 5 2018, 5:48 PM
This revision is now accepted and ready to land.Dec 5 2018, 5:48 PM
This revision was automatically updated to reflect the committed changes.