From 2d1622ea096483a3239be24af0711d17e6699ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 24 Mar 2015 10:43:48 +0100 Subject: [PATCH] Fix build without Wayland, but with HAVE_X11_XCB Build error in SceneOpenGL. --- scene_opengl.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 2a4e4f40c8..04b51d7247 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -30,18 +30,20 @@ along with this program. If not, see . #ifdef KWIN_HAVE_EGL #include "eglonxbackend.h" // for Wayland +#if HAVE_WAYLAND #if HAVE_WAYLAND_EGL #include "egl_wayland_backend.h" #include "wayland_backend.h" #include "wayland_server.h" -#endif +#endif // HAVE_WAYLAND_EGL #if HAVE_X11_XCB #include "x11windowed_backend.h" -#endif -#endif +#endif // HAVE_X11_XCB +#endif // HAVE_WAYLAND +#endif // KWIN_HAVE_EGL #ifndef KWIN_HAVE_OPENGLES #include "glxbackend.h" -#endif +#endif // KWIN_HAVE_OPENGLES #include #include @@ -499,23 +501,26 @@ SceneOpenGL *SceneOpenGL::createScene(QObject *parent) break; case EglPlatformInterface: #ifdef KWIN_HAVE_EGL +#if HAVE_WAYLAND if (kwinApp()->shouldUseWaylandForCompositing()) { #if HAVE_WAYLAND_EGL if (Wayland::WaylandBackend *b = dynamic_cast(waylandServer()->backend())) { backend = new EglWaylandBackend(b); } -#endif +#endif // HAVE_WAYLAND_EGL #if HAVE_X11_XCB if (!backend) { if (X11WindowedBackend *b = dynamic_cast(waylandServer()->backend())) { backend = new EglOnXBackend(b); } } -#endif - } else { +#endif // HAVE_X11_XCB + } else +#endif // HAVE_WAYLAND + { backend = new EglOnXBackend(); } -#endif +#endif // KWIN_HAVE_EGL break; default: // no backend available