[server] Apply position change directly for desync sub-surfaces
ClosedPublic

Authored by graesslin on Mar 24 2016, 12:48 PM.

Details

Summary

This is a workaround for https://bugreports.qt.io/browse/QTBUG-52118

It should take effect whenever the parent surface's state is applied,
but QtWayland never commits the parent surface. Thus the position is
always wrong.

Having a workaround for that in our server code is not good, but better
than completely broken applications such as Systemsettings.

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 2934.Mar 24 2016, 12:48 PM
graesslin retitled this revision from to [server] Apply position change directly for desync sub-surfaces.
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 24 2016, 12:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript


The problem without the workaround. With the workaround the nested QQuickView is positioned exactly as expected.

sebas added a subscriber: sebas.Mar 24 2016, 1:21 PM
sebas added inline comments.
src/server/subcompositor_interface.cpp
211 ↗(On Diff #2934)

I'm not sure I understand ... this line applies to the "not sync" case, so we'll want to schedule an update, but then there's that return. Should it not be the other way round, that is "apply directly when sync, schedule when desync"?

graesslin added inline comments.Mar 24 2016, 3:04 PM
src/server/subcompositor_interface.cpp
211 ↗(On Diff #2934)

I'm trying here to workaround Qt's bug in the least dangerous way. Qt has all surfaces in desync, that's why I check whether it's desync. For desync a direct update is not as bad as for a synced surface. But yeah the code is wrong and not following the spec.

But we cannot go on Wayland with systemsettings that broken :-(

sebas accepted this revision.Mar 24 2016, 3:05 PM
sebas added a reviewer: sebas.

I understand now.

This revision is now accepted and ready to land.Mar 24 2016, 3:05 PM
This revision was automatically updated to reflect the committed changes.