From d6717523becade3ab63d742cbb4f51029a571b6e Mon Sep 17 00:00:00 2001 From: dscho Date: Tue, 27 Nov 2001 16:06:02 +0000 Subject: fixed dumb XTestFakeInput bug --- TODO | 2 +- x11vnc.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index c5b984f..70dae90 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ immediate: ---------- x11vnc: clipboard, cursor, updates interruptible by input (doesn't work yet) -.x11vnc: sometimes XTest fails (but doesn't with x0rfbserver) extra_bytes in rfbDrawCharWithClip. tested mouse buttons make copy rect, but text is not marked as mod. cursor drawing: set optional grain to mark bigger rectangles as drawn (else @@ -29,6 +28,7 @@ internal HTTP tunnelling feature (needs a special GET target and a few done: ----- +.x11vnc: sometimes XTest fails (but doesn't with x0rfbserver) .DeferUpdateTime (timing problems!) .empty cursor sending doesn't work. .udp (need an rfbClientPtr udpClient in rfbScreen) diff --git a/x11vnc.c b/x11vnc.c index cfdb615..7b4f9d6 100644 --- a/x11vnc.c +++ b/x11vnc.c @@ -101,18 +101,18 @@ void keyboard(Bool down,KeySym keySym,rfbClientPtr cl) if(keySym>=' ' && keySym<0x100) { KeyCode k; - /* if(down) - tweakModifiers(modifiers[keySym],True); */ - tweakModifiers(modifiers[keySym],down); - XTestFakeKeyEvent(dpy,XK_Shift_R,True,CurrentTime); - k = XKeysymToKeycode( dpy,keySym ); + if(down) + tweakModifiers(modifiers[keySym],True); + //tweakModifiers(modifiers[keySym],down); + //k = XKeysymToKeycode( dpy,keySym ); + k = keycodes[keySym]; if(k!=NoSymbol) { XTestFakeKeyEvent(dpy,k,down,CurrentTime); gotInput = TRUE; } /*XTestFakeKeyEvent(dpy,keycodes[keySym],down,CurrentTime);*/ - /*if(down) - tweakModifiers(modifiers[keySym],False);*/ + if(down) + tweakModifiers(modifiers[keySym],False); gotInput = TRUE; } else { KeyCode k = XKeysymToKeycode( dpy,keySym ); -- cgit v1.2.1