diff options
author | dscho <dscho> | 2005-12-19 19:45:51 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-12-19 19:45:51 +0000 |
commit | 1c26789eff7b22518fcfb942e3d5a36758fdca19 (patch) | |
tree | 0891f60a4ca30fe031ae6c7090251c1d750e970a /libvncserver/rfbserver.c | |
parent | 1b81e342cbed1b620dec7065b1c06b47df0b6d92 (diff) | |
download | libtdevnc-1c26789eff7b22518fcfb942e3d5a36758fdca19.tar.gz libtdevnc-1c26789eff7b22518fcfb942e3d5a36758fdca19.zip |
introduce -deferptrupdate (thanks Dave)
Diffstat (limited to 'libvncserver/rfbserver.c')
-rw-r--r-- | libvncserver/rfbserver.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 2b61375..e60aadc 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -353,6 +353,8 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, cl->extensions = NULL; + cl->lastPtrX = -1; + sprintf(pv,rfbProtocolVersionFormat,rfbProtocolMajorVersion, rfbProtocolMinorVersion); @@ -1071,11 +1073,19 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) cl->screen->pointerClient = cl; if(!cl->viewOnly) { - cl->screen->ptrAddEvent(msg.pe.buttonMask, - Swap16IfLE(msg.pe.x), Swap16IfLE(msg.pe.y), cl); - } + if (msg.pe.buttonMask != cl->lastPtrButtons || + cl->screen->deferPtrUpdateTime == 0) { + cl->screen->ptrAddEvent(msg.pe.buttonMask, + Swap16IfLE(msg.pe.x), Swap16IfLE(msg.pe.y), cl); + cl->lastPtrButtons = msg.pe.buttonMask; + } else { + cl->lastPtrX = Swap16IfLE(msg.pe.x); + cl->lastPtrY = Swap16IfLE(msg.pe.y); + cl->lastPtrButtons = msg.pe.buttonMask; + } + } + return; - return; case rfbClientCutText: |