Parcourir la source

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.
tags/v1.10.90
Pierre Ossman il y a 4 ans
Parent
révision
2cd3cb4816
1 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. 6
    3
      vncviewer/Viewport.cxx

+ 6
- 3
vncviewer/Viewport.cxx Voir le fichier

@@ -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
}

Chargement…
Annuler
Enregistrer