[server] Workaround for QtWayland bug https://bugreports.qt.io/browse/QTBUG-52192
ClosedPublic

Authored by graesslin on Mar 29 2016, 2:02 PM.

Details

Summary

QtWayland doesn't map the parent sub-surfaces in a sub-surface tree.
According to the spec this would mean also the child sub-surface is not
mapped. But being strict according to the spec will make applications
like SystemSettings fail badly. Embedded child windows will not be
rendered and QtWayland is going to hard freeze. This is not acceptable,
thus we need to workaround this QtWayland bug till it's fixed.

It's worth mentioning that Weston as the reference compositor also
doesn't handle this situation according to spec and renders the
sub-surface. See https://bugs.freedesktop.org/show_bug.cgi?id=94735

The difficult part for the workaround is to determine whether a surface
should be considered unmapped. E.g. when the parent gets unmapped we need
to really unmap it. But what's the difference between an unmapped parent
surface which should be considered mapped and an unmapped parent surface
which should be considered unmapped?

The implementation goes with considering a new sub-surface always as
mapped - independently of whether it ever got a buffer attached. As soon
as it had a buffer attached and it gets unmapped again, it will go back
to a standard conform way.

The behavior now is not standard conform, thus the autotest is adjusted
to have QEXPECT_FAIL for the now no longer standard conform areas.

Diff Detail

Repository
R127 KWayland
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 3004.Mar 29 2016, 2:02 PM
graesslin retitled this revision from to [server] Workaround for QtWayland bug https://bugreports.qt.io/browse/QTBUG-52192.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptMar 29 2016, 2:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Apr 3 2016, 12:12 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Apr 3 2016, 12:12 PM
This revision was automatically updated to reflect the committed changes.