[server] Add a workaround for a freeze in QtWayland
Summary: See: https://bugreports.qt.io/browse/QTBUG-52092 Freeze happens if a sub-surface is rendered to before the main surface is rendered. The compositor has no chance to know that this is a window which needs to be rendered, thus the application might freeze without ever becoming visible. Famous example applications being affected: all kcms with a nested QQuickView. E.g.: kcmshell5 kwineffects Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1208
This commit is contained in:
parent
84118fad13
commit
04ccf04596
1 changed files with 5 additions and 0 deletions
|
@ -338,6 +338,11 @@ void SurfaceInterface::Private::swapStates(State *source, State *target, bool em
|
|||
target->damage = windowRegion.intersected(target->damage);
|
||||
if (emitChanged) {
|
||||
emit q->damaged(target->damage);
|
||||
// workaround for https://bugreports.qt.io/browse/QTBUG-52092
|
||||
// if the surface is a sub-surface, but the main surface is not yet mapped, fake frame rendered
|
||||
if (subSurface && !subSurface->mainSurface()->buffer()) {
|
||||
q->frameRendered(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!target->buffer && emitChanged) {
|
||||
|
|
Loading…
Reference in a new issue