Commit 0c2c5073 authored by dscho's avatar dscho

input works on other X11 servers than XFree86

parent 3825ed9f
...@@ -9,8 +9,8 @@ VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg ...@@ -9,8 +9,8 @@ VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg
# The code for 3 Bytes/Pixel is not very efficient! # The code for 3 Bytes/Pixel is not very efficient!
FLAG24 = -DALLOW24BPP FLAG24 = -DALLOW24BPP
#OPTFLAGS=-g # -Wall OPTFLAGS=-g # -Wall
OPTFLAGS=-O2 -Wall #OPTFLAGS=-O2 -Wall
CFLAGS=$(OPTFLAGS) $(PTHREADDEF) $(FLAG24) $(INCLUDES) CFLAGS=$(OPTFLAGS) $(PTHREADDEF) $(FLAG24) $(INCLUDES)
RANLIB=ranlib RANLIB=ranlib
...@@ -58,7 +58,8 @@ OSXvnc-server: mac.o libvncserver.a ...@@ -58,7 +58,8 @@ OSXvnc-server: mac.o libvncserver.a
$(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS) $(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS)
x11vnc: x11vnc.o libvncserver.a x11vnc: x11vnc.o libvncserver.a
$(CC) -o x11vnc x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a $(XLIBS) $(CC) -o x11vnc x11vnc.o libvncserver.a -lz -ljpeg $(XLIBS)
# $(CC) -o x11vnc x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a $(XLIBS)
#$(LIBS) $(XLIBS) #$(LIBS) $(XLIBS)
storepasswd: storepasswd.o d3des.o vncauth.o storepasswd: storepasswd.o d3des.o vncauth.o
......
...@@ -248,6 +248,8 @@ int main(int argc,char** argv) ...@@ -248,6 +248,8 @@ int main(int argc,char** argv)
exit(2); exit(2);
} }
XTestGrabControl(dpy,True);
xscreen = DefaultScreen(dpy); xscreen = DefaultScreen(dpy);
init_keycodes(); init_keycodes();
...@@ -330,6 +332,7 @@ int main(int argc,char** argv) ...@@ -330,6 +332,7 @@ int main(int argc,char** argv)
maxMsecsToConnect -= screen->rfbDeferUpdateTime; maxMsecsToConnect -= screen->rfbDeferUpdateTime;
if(maxMsecsToConnect<0) { if(maxMsecsToConnect<0) {
fprintf(stderr,"Maximum time to connect reached. Exiting.\n"); fprintf(stderr,"Maximum time to connect reached. Exiting.\n");
XTestDiscard(dpy);
exit(2); exit(2);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment