summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp14
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp5
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h2
-rw-r--r--src/plugins/graphicssystems/opengl/main.cpp10
4 files changed, 28 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
index 0ad4071..8662df6 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp
@@ -207,6 +207,7 @@ 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;
@@ -226,6 +227,19 @@ 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 b324189..4413858 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -591,12 +591,15 @@ bool QDirectFBScreenCursor::createWindow()
Q_ASSERT(!cursor.isNull());
DFBWindowDescription description;
memset(&description, 0, sizeof(DFBWindowDescription));
- description.flags = DWDESC_POSX|DWDESC_POSY|DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_CAPS|DWDESC_OPTIONS|DWDESC_PIXELFORMAT|DWDESC_SURFACE_CAPS;
+ description.flags = DWDESC_POSX|DWDESC_POSY|DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_CAPS|DWDESC_PIXELFORMAT|DWDESC_SURFACE_CAPS;
description.width = cursor.width();
description.height = cursor.height();
description.posx = pos.x() - hotspot.x();
description.posy = pos.y() - hotspot.y();
+#if (Q_DIRECTFB_VERSION >= 0x010100)
+ description.flags |= DWDESC_OPTIONS;
description.options = DWOP_GHOST|DWOP_ALPHACHANNEL;
+#endif
description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER;
const QImage::Format format = QDirectFBScreen::instance()->alphaPixmapFormat();
description.pixelformat = QDirectFBScreen::getSurfacePixelFormat(format);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index eec70e1..79a01d3 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -110,7 +110,7 @@ QT_MODULE(Gui)
#error QT_DIRECTFB_WINDOW_AS_CURSOR requires QT_DIRECTFB_WM to be defined
#endif
-#define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION)
+#define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERSION << 8) | DIRECTFB_MICRO_VERSION)
#define DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(F) \
static inline F operator~(F f) { return F(~int(f)); } \
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp
index 0562132..c28b09a 100644
--- a/src/plugins/graphicssystems/opengl/main.cpp
+++ b/src/plugins/graphicssystems/opengl/main.cpp
@@ -41,6 +41,7 @@
#include <private/qgraphicssystemplugin_p.h>
#include <private/qgraphicssystem_gl_p.h>
+#include <qgl.h>
QT_BEGIN_NAMESPACE
@@ -53,11 +54,18 @@ public:
QStringList QGLGraphicsSystemPlugin::keys() const
{
- return QStringList(QLatin1String("OpenGL"));
+ QStringList list;
+ list << QLatin1String("OpenGL") << QLatin1String("OpenGL1");
+ return list;
}
QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system)
{
+ if (system.toLower() == QLatin1String("opengl1")) {
+ QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
+ return new QGLGraphicsSystem;
+ }
+
if (system.toLower() == QLatin1String("opengl"))
return new QGLGraphicsSystem;