浏览代码

Allow XK_Scroll_Lock when LED state isn't supported

Otherwise such clients cannot use Scroll Lock at all, and that is
probably worse than any effects we might get from getting out of sync.
tags/v1.10.90
Pierre Ossman 4 年前
父节点
当前提交
81e114f29f
共有 2 个文件被更改,包括 2 次插入10 次删除
  1. 1
    9
      common/rfb/VNCSConnectionST.cxx
  2. 1
    1
      vncviewer/CConn.cxx

+ 1
- 9
common/rfb/VNCSConnectionST.cxx 查看文件

@@ -519,8 +519,7 @@ void VNCSConnectionST::keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down) {
// Avoid lock keys if we don't know the server state
if ((server->getLEDState() == ledUnknown) &&
((keysym == XK_Caps_Lock) ||
(keysym == XK_Num_Lock) ||
(keysym == XK_Scroll_Lock))) {
(keysym == XK_Num_Lock))) {
vlog.debug("Ignoring lock key (e.g. caps lock)");
return;
}
@@ -528,13 +527,6 @@ void VNCSConnectionST::keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down) {
// Lock key heuristics
// (only for clients that do not support the LED state extension)
if (!client.supportsLEDState()) {
// Always ignore ScrollLock as we don't have a heuristic
// for that
if (keysym == XK_Scroll_Lock) {
vlog.debug("Ignoring lock key (e.g. caps lock)");
return;
}

if (down && (server->getLEDState() != ledUnknown)) {
// CapsLock synchronisation heuristic
// (this assumes standard interaction between CapsLock the Shift

+ 1
- 1
vncviewer/CConn.cxx 查看文件

@@ -82,7 +82,7 @@ CConn::CConn(const char* vncServerName, network::Socket* socket=NULL)

supportsLocalCursor = true;
supportsDesktopResize = true;
supportsLEDState = true;
supportsLEDState = false;

if (customCompressLevel)
setCompressLevel(::compressLevel);

正在加载...
取消
保存