From: Morten Sorvig Date: Fri, 27 May 2011 06:12:13 +0000 (+0200) Subject: Compile on non-linux X-Git-Tag: qt-v5.0.0-alpha1~223^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c187369b80e8cbdbe0f3ae942d79a55e2b0f28d;p=profile%2Fivi%2Fqtwayland.git Compile on non-linux --- diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.cpp b/src/qt-compositor/wayland_wrapper/wlsurface.cpp index 225b7ab..0d4e9cb 100644 --- a/src/qt-compositor/wayland_wrapper/wlsurface.cpp +++ b/src/qt-compositor/wayland_wrapper/wlsurface.cpp @@ -49,7 +49,9 @@ #include +#ifdef Q_OS_LINUX #include +#endif #ifdef QT_COMPOSITOR_WAYLAND_GL #include "hardware_integration/graphicshardwareintegration.h" @@ -276,6 +278,11 @@ void Surface::setAuthenticationToken(const QByteArray &authenticationToken) uint32_t toWaylandButton(Qt::MouseButton button) { +#ifndef BTN_LEFT +uint32_t BTN_LEFT = 0x110; +uint32_t BTN_RIGHT = 0x111; +uint32_t BTN_MIDDLE = 0x112; +#endif switch (button) { case Qt::LeftButton: return BTN_LEFT; @@ -284,6 +291,7 @@ uint32_t toWaylandButton(Qt::MouseButton button) default: return BTN_MIDDLE; } + } void Surface::sendMousePressEvent(int x, int y, Qt::MouseButton button)