[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
patch 18-11 compile and numlock fix
hi,
the attached patch fixes the following small problems with 18-11:
o rdesktop must be linked with -lXkb (on my debian box at least)
o ui_sync_lockkeys was not in proto.h
o numlock/capslock sync was not working in some cases(see below)
the numlock sync had no effect if the first event was a
pointer event in some cases!?
after moving the ui_sync_lockkeys() into the XCheckWindowEvent loop's
KeyPress case it seemed to work fine.
two questions:
- any hints for a better place?
- any new information/ideas regarding the server numlock state query
problem?
best regards,
norbert
diff -u rdesktop.pl18-11/Makefile rdesktop-patched/Makefile
--- rdesktop.pl18-11/Makefile Wed Jan 10 22:19:27 2001
+++ rdesktop-patched/Makefile Wed Jan 10 22:21:36 2001
@@ -12,7 +12,7 @@
CC = gcc
CFLAGS = -O2 -Wall $(DEBUG) -I/usr/X11R6/include
-LIBS = -L/usr/X11R6/lib -lX11
+LIBS = -L/usr/X11R6/lib -lX11 -lXext
RDPOBJ = rdesktop.o tcp.o iso.o mcs.o secure.o licence.o rdp.o orders.o bitmap.o cache.o xwin.o
CRYPTOBJ = crypto/rc4_enc.o crypto/rc4_skey.o crypto/md5_dgst.o crypto/sha1dgst.o crypto/arith.o
Common subdirectories: rdesktop.pl18-11/crypto and rdesktop-patched/crypto
diff -u rdesktop.pl18-11/proto.h rdesktop-patched/proto.h
--- rdesktop.pl18-11/proto.h Wed Jan 10 22:19:27 2001
+++ rdesktop-patched/proto.h Wed Jan 10 22:21:36 2001
@@ -90,3 +90,4 @@
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
void ui_sync();
+void ui_sync_lockkeys();
diff -u rdesktop.pl18-11/xwin.c rdesktop-patched/xwin.c
--- rdesktop.pl18-11/xwin.c Wed Jan 10 22:19:27 2001
+++ rdesktop-patched/xwin.c Wed Jan 10 22:22:50 2001
@@ -275,11 +275,6 @@
if (display == NULL)
return;
- if(!lockkeys_synced) {
- sync_lockkeys();
- lockkeys_synced=True;
- }
-
while (XCheckWindowEvent (display, wnd, ~0, &event))
{
ev_time = time (NULL);
@@ -287,6 +282,12 @@
{
case KeyPress:
+
+ if(!lockkeys_synced) {
+ ui_sync_lockkeys();
+ lockkeys_synced=True;
+ }
+
scancode = xwin_translate_key (event.xkey.keycode);
if (scancode == 0)
break;