From a84b3d072a89e05c5aa5f702d223cfe304379293 Mon Sep 17 00:00:00 2001 From: dscho Date: Tue, 18 Jan 2005 23:18:04 +0000 Subject: 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. --- examples/example.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'examples') 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 && xscreen->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); -- cgit v1.2.1