[Bugfix] Honor dotWhenNoCursor option (and it's changes) every time.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3904 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/vncviewer/DesktopWindow.cxx b/unix/vncviewer/DesktopWindow.cxx
index 51f3b85..234e004 100644
--- a/unix/vncviewer/DesktopWindow.cxx
+++ b/unix/vncviewer/DesktopWindow.cxx
@@ -79,7 +79,7 @@
                PointerMotionMask | KeyPressMask | KeyReleaseMask |
                EnterWindowMask | LeaveWindowMask);
   createXCursors();
-  XDefineCursor(dpy, win(), dotCursor);
+  setNoCursor();
   im = new TXImage(dpy, width(), height());
   if (!serverPF.trueColour)
     im->setPF(serverPF);
@@ -139,12 +139,9 @@
     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;
   }
@@ -206,7 +203,7 @@
 void DesktopWindow::resetLocalCursor()
 {
   hideLocalCursor();
-  XDefineCursor(dpy, win(), dotCursor);
+  setNoCursor();
   cursorAvailable = false;
 }
 
@@ -226,7 +223,7 @@
     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;
     }