summaryrefslogtreecommitdiffstats
path: root/x11vnc.c
diff options
context:
space:
mode:
authordscho <dscho>2001-11-25 18:03:41 +0000
committerdscho <dscho>2001-11-25 18:03:41 +0000
commit740fdfd0519ff49e9d5f9ac377fe2736d10c469d (patch)
treeb7eb5f2d6f6eba3d765572548547bd60a24ebb3d /x11vnc.c
parent8c70b3010714623964d7b86b72fdf89ab5d26ca4 (diff)
downloadlibtdevnc-740fdfd0519ff49e9d5f9ac377fe2736d10c469d.tar.gz
libtdevnc-740fdfd0519ff49e9d5f9ac377fe2736d10c469d.zip
init keyboard now takes correct display
Diffstat (limited to 'x11vnc.c')
-rw-r--r--x11vnc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/x11vnc.c b/x11vnc.c
index 2c261eb..394631f 100644
--- a/x11vnc.c
+++ b/x11vnc.c
@@ -25,13 +25,11 @@ KeyCode keycodes[0x100],leftShiftCode,rightShiftCode,altGrCode;
void init_keycodes()
{
- Display *dpy;
KeySym key,*keymap;
int i,j,minkey,maxkey,syms_per_keycode;
memset(modifiers,-1,sizeof(modifiers));
- dpy=XOpenDisplay("");
XDisplayKeycodes(dpy,&minkey,&maxkey);
keymap=XGetKeyboardMapping(dpy,minkey,(maxkey - minkey + 1),&syms_per_keycode);
@@ -227,6 +225,7 @@ int main(int argc,char** argv)
for(i=argc-1;i>0;i--)
if(i<argc-1 && strcmp(argv[i],"-display")==0) {
+ fprintf(stderr,"Using display %s\n",argv[i+1]);
dpy = XOpenDisplay(argv[i+1]);
if(dpy==0) {
fprintf(stderr,"Couldn't connect to display \"%s\".\n",argv[i+1]);