diff --git a/examples/qwidget-compositor/main.cpp b/examples/qwidget-compositor/main.cpp
index 970074cf3ab3079b257c416678d7298a8db3444d..adac4cfa082c96d14f9cc36b546c7ed83e7254db 100644
--- a/examples/qwidget-compositor/main.cpp
+++ b/examples/qwidget-compositor/main.cpp
@@ -70,13 +70,13 @@ class QWidgetCompositor : public QWidget, public WaylandCompositor
 public:
     QWidgetCompositor()
         : WaylandCompositor(windowHandle())
-        , m_moveSurface(0)
-        , m_dragSourceSurface(0)
 #ifdef QT_COMPOSITOR_WAYLAND_GL
         , m_surfaceCompositorFbo(0)
         , m_textureBlitter(0)
         , m_textureCache(0)
 #endif
+        , m_moveSurface(0)
+        , m_dragSourceSurface(0)
     {
         enableSubSurfaceExtension();
         setMouseTracking(true);
@@ -307,7 +307,7 @@ protected:
             return;
         }
         QPointF local;
-        if (WaylandSurface *surface = surfaceAt(e->pos(), &local))
+        if (surfaceAt(e->pos(), &local))
             defaultInputDevice()->sendMouseMoveEvent(local.toPoint(),pos());
     }
 
@@ -326,7 +326,7 @@ protected:
             return;
         }
         QPointF local;
-        if (WaylandSurface *surface = surfaceAt(e->pos(), &local))
+        if (surfaceAt(e->pos(), &local))
             defaultInputDevice()->sendMouseReleaseEvent(e->button(), local.toPoint(), e->pos());
     }