summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-10 09:07:19 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-10 09:07:19 (GMT)
commita3256014d6adb31c89b0e5de5b0decc393649b70 (patch)
treecd315ffdb3e35f4040b268e9dc083244da084b2a /src/plugins
parentb17cc4918bfc4b250293000bdabcb8f2dbdec787 (diff)
parent2c232cdbce3eba095da26362b964f411a9d3ba80 (diff)
downloadQt-a3256014d6adb31c89b0e5de5b0decc393649b70.zip
Qt-a3256014d6adb31c89b0e5de5b0decc393649b70.tar.gz
Qt-a3256014d6adb31c89b0e5de5b0decc393649b70.tar.bz2
Merge branch '4.6'
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp14
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h2
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp2
4 files changed, 21 insertions, 4 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 c2ae2fb..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);
@@ -1202,7 +1205,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
"Unable to get screen!", result);
return false;
}
- const QString qws_size = qgetenv("QWS_SIZE");
+ const QString qws_size = QString::fromLatin1(qgetenv("QWS_SIZE"));
if (!qws_size.isEmpty()) {
QRegExp rx(QLatin1String("(\\d+)x(\\d+)"));
if (!rx.exactMatch(qws_size)) {
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/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
index 1cbc1d7..a86a3a4 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
@@ -74,7 +74,7 @@ public:
+ QString::number((((((size.width()<<11)|size.height())<<11)|mode)<<4)|state, 16); }
void stepSerialNum()
- { serialNum = lastSerialNum.fetchAndAddRelaxed(1); };
+ { serialNum = lastSerialNum.fetchAndAddRelaxed(1); }
void loadDataForModeAndState(QSvgRenderer *renderer, QIcon::Mode mode, QIcon::State state);