PointerMotionMask | KeyPressMask | KeyReleaseMask |
EnterWindowMask | LeaveWindowMask);
createXCursors();
- XDefineCursor(dpy, win(), dotCursor);
+ setNoCursor();
im = new TXImage(dpy, width(), height());
if (!serverPF.trueColour)
im->setPF(serverPF);
if (((rdr::U8*)mask)[i]) break;
if (i == mask_len) {
- if (dotWhenNoCursor) {
+ if (dotWhenNoCursor)
vlog.debug("cursor is empty - using dot");
- XDefineCursor(dpy, win(), dotCursor);
- } else {
- XDefineCursor(dpy, win(), noCursor);
- }
+ setNoCursor();
cursorAvailable = false;
return;
}
void DesktopWindow::resetLocalCursor()
{
hideLocalCursor();
- XDefineCursor(dpy, win(), dotCursor);
+ setNoCursor();
cursorAvailable = false;
}
if (!getPF().equal(cursor.getPF()) ||
cursor.getRect().is_empty()) {
vlog.error("attempting to render invalid local cursor");
- XDefineCursor(dpy, win(), dotCursor);
+ setNoCursor();
cursorAvailable = false;
return;
}
#include "TXWindow.h"
#include "TXViewport.h"
#include "TXImage.h"
+#include "parameters.h"
class CConn;
// resetLocalCursor() stops the rendering of the local cursor
void resetLocalCursor();
+ // setNoCursor() sets what to display when no cursor is defined - if dot or
+ // nothing.
+ inline void setNoCursor() {
+ XDefineCursor(dpy, win(), dotWhenNoCursor ? dotCursor : noCursor);
+ }
+
// Methods forwarded from CConn
void setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs);
void serverCutText(const char* str, rdr::U32 len);