diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-12-23 16:26:40 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-12-23 16:28:52 +0100 |
commit | 2cd3cb48164f105a1c066102c8430317d94bb9f0 (patch) | |
tree | 3e74416beeea191feb733395df9466f30c5d9113 /vncviewer | |
parent | 50c72dccc7dde2c7d3f50c828d4a79d52523b251 (diff) | |
download | tigervnc-2cd3cb48164f105a1c066102c8430317d94bb9f0.tar.gz tigervnc-2cd3cb48164f105a1c066102c8430317d94bb9f0.zip |
Set initial blank cursor
If the server doesn't support local cursors and want to render them
itself then we need to make sure the local cursor is invisible.
This also makes sure we always have some cursor allocated, so we can
remove the checks in some places.
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/Viewport.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index cd613279..618845f4 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -184,6 +184,9 @@ Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_) setMenuKey(); OptionsDialog::addCallback(handleOptions, this); + + // Make sure we have an initial blank cursor set + setCursor(0, 0, rfb::Point(0, 0), NULL); } @@ -579,8 +582,7 @@ int Viewport::handle(int event) return 1; case FL_ENTER: - if (cursor) - window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y); + window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y); // Yes, we would like some pointer events please! return 1; @@ -1267,7 +1269,7 @@ void Viewport::popupContextMenu() handle(FL_FOCUS); // Back to our proper mouse pointer. - if ((Fl::belowmouse() == this) && cursor) + if (Fl::belowmouse()) window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y); if (m == NULL) @@ -1351,4 +1353,5 @@ void Viewport::handleOptions(void *data) Viewport *self = (Viewport*)data; self->setMenuKey(); + // FIXME: Need to recheck cursor for dotWhenNoCursor } |