libvnc.so: don't use unexported key_is_down function.

This commit is contained in:
Tim Waugh 2013-07-24 17:15:41 +01:00
parent 2510f5c609
commit 544fe4cd65
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,50 @@
diff -up tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc.key_is_down tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc
--- tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc.key_is_down 2013-07-24 12:54:41.461930866 +0100
+++ tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc 2013-07-24 13:04:39.743663652 +0100
@@ -321,7 +321,11 @@ std::list<KeyCode> InputDevice::releaseS
XkbAction *act;
unsigned char mask;
- if (!key_is_down(master, key, KEY_PROCESSED))
+ int bit;
+ BYTE *kptr;
+ kptr = &master->key->down[key >> 3];
+ bit = 1 << (key & 7);
+ if (*kptr & bit)
continue;
act = XkbKeyActionPtr(xkb, key, state);
@@ -402,7 +406,11 @@ std::list<KeyCode> InputDevice::releaseL
XkbAction *act;
unsigned char key_mask;
- if (!key_is_down(master, key, KEY_PROCESSED))
+ int bit;
+ BYTE *kptr;
+ kptr = &master->key->down[key >> 3];
+ bit = 1 << (key & 7);
+ if (*kptr & bit)
continue;
act = XkbKeyActionPtr(xkb, key, state);
@@ -638,6 +646,8 @@ void InputDevice::vncXkbProcessDeviceEve
if (event->device_event.sourceid == self->keyboardDev->id) {
XkbControlsPtr ctrls;
+ int bit;
+ BYTE *kptr;
/*
* We need to bypass AccessX since it is timing sensitive and
@@ -651,8 +661,10 @@ void InputDevice::vncXkbProcessDeviceEve
* This flag needs to be set for key repeats to be properly
* respected.
*/
+ kptr = &dev->key->down[event->device_event.detail.key >> 3];
+ bit = 1 << (event->device_event.detail.key & 7);
if ((event->device_event.type == ET_KeyPress) &&
- key_is_down(dev, event->device_event.detail.key, KEY_PROCESSED))
+ (*kptr & bit))
event->device_event.key_repeat = TRUE;
}

View File

@ -46,6 +46,7 @@ Patch6: tigervnc-setcursor-crash.patch
Patch7: tigervnc-manpages.patch
Patch8: tigervnc-getmaster.patch
Patch9: tigervnc-shebang.patch
Patch10: tigervnc-key_is_down.patch
%description
Virtual Network Computing (VNC) is a remote display system which
@ -168,6 +169,9 @@ popd
# Don't use shebang in vncserver script.
%patch9 -p1 -b .shebang
# libvnc.so: don't use unexported key_is_down function.
%patch10 -p1 -b .key_is_down
%build
%ifarch sparcv9 sparc64 s390 s390x
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
@ -336,6 +340,7 @@ fi
%changelog
* Wed Jul 24 2013 Tim Waugh <twaugh@redhat.com> 1.3.0-3
- libvnc.so: don't use unexported key_is_down function.
- Don't use shebang in vncserver script.
* Fri Jul 12 2013 Tim Waugh <twaugh@redhat.com> 1.3.0-2