XFixes only reports cursor changes. We must manually call
XFixesGetCursorImage() when starting.
}
#endif
+#ifdef HAVE_XFIXES
+ setCursor();
+#endif
+
server->setLEDState(ledState);
running = true;
#ifdef HAVE_XFIXES
} else if (ev->type == xfixesEventBase + XFixesCursorNotify) {
XFixesCursorNotifyEvent* cev;
- XFixesCursorImage *cim;
if (!running)
return true;
if (cev->subtype != XFixesDisplayCursorNotify)
return false;
+ return setCursor();
+#endif
+ }
+
+ return false;
+}
+
+bool XDesktop::setCursor()
+{
+ XFixesCursorImage *cim;
+
cim = XFixesGetCursorImage(dpy);
if (cim == NULL)
return false;
delete [] cursorData;
XFree(cim);
return true;
-#endif
- }
-
- return false;
}
-
unsigned ledState;
const unsigned short *codeMap;
unsigned codeMapLen;
+ bool setCursor();
};
#endif // __XDESKTOP_H__