summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfbcursor.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2011-11-21 14:59:26 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-24 12:11:04 +0100
commit426cda9089e69ee9a068554c040ac23eb50d8b97 (patch)
tree41116ecd226beac46ac155550b228b2120ee4ff4 /src/plugins/platforms/directfb/qdirectfbcursor.cpp
parent13505b53b6dd5f7f21e2086700b023c402d9f784 (diff)
directfb: Get the IDirectFBDisplayLayer through the QPlatformScreen
Change-Id: I1e8bacc2a5c39065f1c0667cda900730c5670066 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbcursor.cpp')
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
index 123d69c58e..8698f9ccf9 100644
--- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
@@ -46,7 +46,6 @@
QDirectFBCursor::QDirectFBCursor(QPlatformScreen *screen)
: QPlatformCursor(screen)
{
- QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, m_layer.outPtr());
m_image.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0));
}
@@ -69,11 +68,16 @@ void QDirectFBCursor::changeCursor(QCursor *cursor, QWindow *)
map = cursor->pixmap();
}
+ DFBResult res;
+ IDirectFBDisplayLayer *layer = toDfbLayer(screen);
IDirectFBSurface* surface(QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle()));
- if (m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_ADMINISTRATIVE) != DFB_OK) {
+ res = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
+ if (res != DFB_OK) {
+ DirectFBError("Failed to set DLSCL_ADMINISTRATIVE", res);
return;
}
- m_layer->SetCursorShape(m_layer.data(), surface, xSpot, ySpot);
- m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_SHARED);
+
+ layer->SetCursorShape(layer, surface, xSpot, ySpot);
+ layer->SetCooperativeLevel(layer, DLSCL_SHARED);
}