[server] Add a workaround for a freeze in QtWayland

Authored by graesslin on Mar 23 2016, 4:01 PM.

Description

[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