Send a fake pointer event on initial connection so that we get rid of that
double mouse pointer problem as the server renders its own copy.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4790 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 0de1b8b..fb19fa7 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -100,6 +100,12 @@
setMenuKey();
OptionsDialog::addCallback(handleOptions, this);
+
+ // Send a fake pointer event so that the server will stop rendering
+ // a server-side cursor. Ideally we'd like to send the actual pointer
+ // position, but we can't really tell when the window manager is done
+ // placing us so we don't have a good time for that.
+ handlePointerEvent(Point(w/2, h/2), 0);
}