Hide drm cursor when exiting
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Wed, 18 Jul 2012 10:03:27 +0000 (13:03 +0300)
committerQt by Nokia <qt-info@nokia.com>
Fri, 20 Jul 2012 07:13:00 +0000 (09:13 +0200)
Change-Id: Ib4e1895dcf3e0168eb759fbecee499d75dd45bfe
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
src/plugins/platforms/kms/qkmscursor.cpp
src/plugins/platforms/kms/qkmscursor.h

index bce4276..e7d1069 100644 (file)
@@ -59,6 +59,12 @@ QKmsCursor::QKmsCursor(QKmsScreen *screen)
     m_cursorImage = new QPlatformCursorImage(0, 0, 0, 0, 0, 0);
 }
 
+QKmsCursor::~QKmsCursor()
+{
+    drmModeSetCursor(m_screen->device()->fd(), m_screen->crtcId(),
+                     0, 0, 0);
+}
+
 void QKmsCursor::pointerEvent(const QMouseEvent &event)
 {
     int status = drmModeMoveCursor(m_screen->device()->fd(),
index c0734eb..01a6e6b 100644 (file)
@@ -58,6 +58,7 @@ class QKmsCursor : public QPlatformCursor
 {
 public:
     QKmsCursor(QKmsScreen *screen);
+    ~QKmsCursor();
 
     void pointerEvent(const QMouseEvent &event);
     void changeCursor(QCursor *widgetCursor, QWindow *window);