diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-07-22 19:15:57 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-07-22 19:16:07 (GMT) |
commit | a974ce81d6324d8d85ade0153b5ce7c757ba4fdf (patch) | |
tree | 3593b982ccb789196e7e53d5d45293ec92e4b73d /src | |
parent | e38aed0bf5ea35db7dc82a943dfffcd31cca4700 (diff) | |
download | Qt-a974ce81d6324d8d85ade0153b5ce7c757ba4fdf.zip Qt-a974ce81d6324d8d85ade0153b5ce7c757ba4fdf.tar.gz Qt-a974ce81d6324d8d85ade0153b5ce7c757ba4fdf.tar.bz2 |
Fix a bug in directfb mouse handling
Always check the mouse data we read for coordinates rather than asking
the layer. This approach works whether we have layers enabled/window
management enabled or any combination thereof.
Also, make sure we use a software cursor when either of NO_WM or
NO_LAYER is defined.
Reviewed: Donald <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp | 14 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 2 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp index 142993d..4365a5d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp @@ -203,7 +203,6 @@ void QDirectFBMouseHandlerPrivate::readMouseData() int wheel = 0; if (input.type == DIET_AXISMOTION) { -#ifdef QT_NO_DIRECTFB_LAYER if (input.flags & DIEF_AXISABS) { switch (input.axis) { case DIAI_X: x = input.axisabs; break; @@ -223,19 +222,6 @@ void QDirectFBMouseHandlerPrivate::readMouseData() "unknown axis (releative) %d", input.axis); } } -#else - if (input.axis == DIAI_X || input.axis == DIAI_Y) { - DFBResult result = layer->GetCursorPosition(layer, &x, &y); - if (result != DFB_OK) { - DirectFBError("QDirectFBMouseHandler::readMouseData", - result); - } - } else if (input.axis == DIAI_Z) { - Q_ASSERT(input.flags & DIEF_AXISREL); - wheel = input.axisrel; - wheel *= -120; - } -#endif } Qt::MouseButtons buttons = Qt::NoButton; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 1efebd9..4b76ef6 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1096,7 +1096,7 @@ bool QDirectFBScreen::initDevice() #endif #ifndef QT_NO_QWS_CURSOR -#ifdef QT_NO_DIRECTFB_WM +#if defined QT_NO_DIRECTFB_WM || defined QT_NO_DIRECTFB_LAYER QScreenCursor::initSoftwareCursor(); #else qt_screencursor = new QDirectFBScreenCursor; |