[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
This commit is contained in:
parent
6d529abf8e
commit
0551a39ab6
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue