From f5845fec02f44aaf1e39d744bc39a26d67fd46fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 31 Jul 2017 18:04:53 +0200 Subject: [PATCH] [plugins/qpa] Properly ifdef everything with HAVE_WAYLAND_EGL Hide variables which are only used with wayland egl and mark attributes as unused if they are not used without having wayland egl. --- plugins/qpa/window.cpp | 3 +++ plugins/qpa/window.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/plugins/qpa/window.cpp b/plugins/qpa/window.cpp index 93e6d7fee8..12431d360b 100644 --- a/plugins/qpa/window.cpp +++ b/plugins/qpa/window.cpp @@ -130,6 +130,9 @@ void Window::createEglSurface(EGLDisplay dpy, EGLConfig config) return; } m_eglSurface = eglCreateWindowSurface(dpy, config, m_eglWaylandWindow, nullptr); +#else + Q_UNUSED(dpy) + Q_UNUSED(config) #endif } diff --git a/plugins/qpa/window.h b/plugins/qpa/window.h index dc02902880..76f8cd2cb7 100644 --- a/plugins/qpa/window.h +++ b/plugins/qpa/window.h @@ -31,7 +31,9 @@ along with this program. If not, see . class QOpenGLFramebufferObject; +#if HAVE_WAYLAND_EGL struct wl_egl_window; +#endif namespace KWayland { @@ -87,7 +89,9 @@ private: QSharedPointer m_contentFBO; bool m_resized = false; ShellClient *m_shellClient = nullptr; +#if HAVE_WAYLAND_EGL wl_egl_window *m_eglWaylandWindow = nullptr; +#endif quint32 m_windowId; const Integration *m_integration; };