Commit 0551a39a authored by Martin Flöser's avatar Martin Flöser
Browse files

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

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.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1212
parent 6d529abf
......@@ -219,6 +219,14 @@ void SubSurfaceInterface::Private::setPositionCallback(wl_client *client, wl_res
void SubSurfaceInterface::Private::setPosition(const QPoint &p)
{
Q_Q(SubSurfaceInterface);
if (!q->isSynchronized()) {
// workaround for https://bugreports.qt.io/browse/QTBUG-52118
// apply directly as Qt doesn't commit the parent surface
pos = p;
emit q->positionChanged(pos);
return;
}
if (scheduledPos == p) {
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment