Only try creating X11 shadow if we have an X11 connection

Summary:
Otherwise it crashes for the first window being created in a
KWin/Wayland without XWayland support.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7894
This commit is contained in:
Martin Flöser 2017-09-20 19:35:21 +02:00
parent 8aa7bb28c8
commit 537b36d1cb

View file

@ -57,7 +57,7 @@ Shadow *Shadow::createShadow(Toplevel *toplevel)
if (!shadow && waylandServer()) {
shadow = createShadowFromWayland(toplevel);
}
if (!shadow) {
if (!shadow && kwinApp()->x11Connection()) {
shadow = createShadowFromX11(toplevel);
}
if (shadow) {