summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordscho <dscho>2005-01-18 23:18:04 +0000
committerdscho <dscho>2005-01-18 23:18:04 +0000
commita84b3d072a89e05c5aa5f702d223cfe304379293 (patch)
tree6e8b11537f0fe91e5a62b2dc559521ce8c9a9a13 /examples
parentdd923e866021418379ee88b8a927597f616fbc84 (diff)
downloadlibtdevnc-a84b3d072a89e05c5aa5f702d223cfe304379293.tar.gz
libtdevnc-a84b3d072a89e05c5aa5f702d223cfe304379293.zip
pointerClient was still static.
do not make requestedRegion empty without reason. the cursor handling for clients which don't handle CursorShape updates was completely broken. It originally was very complicated for performance reasons, however, in most cases it made performance even worse, because at idle times there was way too much checking going on, and furthermore, sometimes unnecessary updates were inevitable. The code now is much more elegant: the ClientRec structure knows exactly where it last painted the cursor, and the ScreenInfo structure knows where the cursor shall be. As a consequence there is no more rfbDrawCursor()/rfbUndrawCursor(), no more dontSendFramebufferUpdate, and no more isCursorDrawn. It is now possible to have clients which understand CursorShape updates and clients which don't at the same time. rfbSetCursor no longer has the option freeOld; this is obsolete, as the cursor structure knows what to free and what not.
Diffstat (limited to 'examples')
-rw-r--r--examples/example.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/examples/example.c b/examples/example.c
index 7c6c3e3..da1385e 100644
--- a/examples/example.c
+++ b/examples/example.c
@@ -125,9 +125,6 @@ void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
{
ClientData* cd=cl->clientData;
- if(cl->screen->cursorIsDrawn)
- rfbUndrawCursor(cl->screen);
-
if(x>=0 && y>=0 && x<maxx && y<maxy) {
if(buttonMask) {
int i,j,x1,x2,y1,y2;
@@ -172,8 +169,6 @@ void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
if(key==XK_Escape)
rfbCloseClient(cl);
else if(key==XK_Page_Up) {
- if(cl->screen->cursorIsDrawn)
- rfbUndrawCursor(cl->screen);
initBuffer((unsigned char*)cl->screen->frameBuffer);
rfbMarkRectAsModified(cl->screen,0,0,maxx,maxy);
} else if (key == XK_Up) {
@@ -195,8 +190,6 @@ void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
} else if(key>=' ' && key<0x100) {
ClientData* cd=cl->clientData;
int x1=cd->oldx,y1=cd->oldy,x2,y2;
- if(cl->screen->cursorIsDrawn)
- rfbUndrawCursor(cl->screen);
cd->oldx+=rfbDrawCharWithClip(cl->screen,&radonFont,cd->oldx,cd->oldy,(char)key,0,0,cl->screen->width,cl->screen->height,0x00ffffff,0x00ffffff);
rfbFontBBox(&radonFont,(char)key,&x1,&y1,&x2,&y2);
rfbMarkRectAsModified(cl->screen,x1,y1,x2-1,y2-1);