浏览代码

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 4 年前
父节点
当前提交
2cd3cb4816
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6
    3
      vncviewer/Viewport.cxx

+ 6
- 3
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
}

正在加载...
取消
保存