libvnc.so: don't use unexported GetMaster function (bug #744881 again).

Also renumbered patches.

Resolves: rhbz#744881
This commit is contained in:
Tim Waugh 2013-07-12 09:46:56 +01:00
parent a20c1075b3
commit cde0eb1edf
2 changed files with 119 additions and 15 deletions

96
tigervnc-getmaster.patch Normal file
View File

@ -0,0 +1,96 @@
diff -up tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc.getmaster tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc
--- tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc.getmaster 2013-07-12 09:30:50.551459439 +0100
+++ tigervnc-1.3.0/unix/xserver/hw/vnc/InputXKB.cc 2013-07-12 09:38:31.037480528 +0100
@@ -232,10 +232,7 @@ void InputDevice::PrepareInputDevices(vo
unsigned InputDevice::getKeyboardState(void)
{
- DeviceIntPtr master;
-
- master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
- return XkbStateFieldFromRec(&master->key->xkbInfo->state);
+ return XkbStateFieldFromRec(&keyboardDev->master->key->xkbInfo->state);
}
unsigned InputDevice::getLevelThreeMask(void)
@@ -256,7 +253,7 @@ unsigned InputDevice::getLevelThreeMask(
return 0;
}
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
@@ -281,7 +278,7 @@ KeyCode InputDevice::pressShift(void)
if (state & ShiftMask)
return 0;
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
unsigned char mask;
@@ -318,7 +315,7 @@ std::list<KeyCode> InputDevice::releaseS
if (!(state & ShiftMask))
return keys;
- master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+ master = keyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
@@ -371,7 +368,7 @@ KeyCode InputDevice::pressLevelThree(voi
return 0;
}
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
@@ -399,7 +396,7 @@ std::list<KeyCode> InputDevice::releaseL
if (!(state & mask))
return keys;
- master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+ master = keyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
@@ -440,7 +437,7 @@ KeyCode InputDevice::keysymToKeycode(Key
if (new_state != NULL)
*new_state = state;
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
unsigned int state_out;
KeySym dummy;
@@ -497,7 +494,7 @@ bool InputDevice::isLockModifier(KeyCode
XkbDescPtr xkb;
XkbAction *act;
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
@@ -535,7 +532,7 @@ bool InputDevice::isAffectedByNumLock(Ke
if (numlock_keycode == 0)
return false;
- xkb = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = keyboardDev->master->key->xkbInfo->desc;
act = XkbKeyActionPtr(xkb, numlock_keycode, state);
if (act == NULL)
@@ -569,7 +566,7 @@ KeyCode InputDevice::addKeysym(KeySym ke
KeySym *syms;
KeySym upper, lower;
- master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT);
+ master = keyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->max_key_code; key >= xkb->min_key_code; key--) {
if (XkbKeyNumGroups(xkb, key) == 0)

View File

@ -1,6 +1,6 @@
Name: tigervnc
Version: 1.3.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A TigerVNC remote display system
Group: User Interface/Desktops
@ -37,13 +37,14 @@ Obsoletes: vnc < 4.1.3-2, vnc-libs < 4.1.3-2
Provides: tightvnc = 1.5.0-0.15.20090204svn3586
Obsoletes: tightvnc < 1.5.0-0.15.20090204svn3586
Patch4: tigervnc-cookie.patch
Patch10: tigervnc11-ldnow.patch
Patch11: tigervnc11-gethomedir.patch
Patch13: tigervnc11-rh692048.patch
Patch15: tigervnc-inetd-nowait.patch
Patch16: tigervnc-setcursor-crash.patch
Patch17: tigervnc-manpages.patch
Patch1: tigervnc-cookie.patch
Patch2: tigervnc11-ldnow.patch
Patch3: tigervnc11-gethomedir.patch
Patch4: tigervnc11-rh692048.patch
Patch5: tigervnc-inetd-nowait.patch
Patch6: tigervnc-setcursor-crash.patch
Patch7: tigervnc-manpages.patch
Patch8: tigervnc-getmaster.patch
%description
Virtual Network Computing (VNC) is a remote display system which
@ -138,10 +139,10 @@ This package contains icons for TigerVNC viewer
%prep
%setup -q
%patch4 -p1 -b .cookie
%patch10 -p1 -b .ldnow
%patch11 -p1 -b .gethomedir
%patch13 -p1 -b .rh692048
%patch1 -p1 -b .cookie
%patch2 -p1 -b .ldnow
%patch3 -p1 -b .gethomedir
%patch4 -p1 -b .rh692048
cp -r /usr/share/xorg-x11-server-source/* unix/xserver
pushd unix/xserver
@ -153,12 +154,15 @@ popd
# Applied Debian patch to fix busy loop when run from inetd in nowait
# mode (bug #920373).
%patch15 -p1 -b .inetd-nowait
%patch5 -p1 -b .inetd-nowait
%patch16 -p1 -b .setcursor-crash
%patch6 -p1 -b .setcursor-crash
# Synchronise manpages and --help output (bug #980870).
%patch17 -p1 -b .manpages
%patch7 -p1 -b .manpages
# libvnc.so: don't use unexpected GetMaster function (bug #744881 again).
%patch8 -p1 -b .getmaster
%build
%ifarch sparcv9 sparc64 s390 s390x
@ -327,6 +331,10 @@ fi
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Fri Jul 12 2013 Tim Waugh <twaugh@redhat.com> 1.3.0-2
- Renumbered patches.
- libvnc.so: don't use unexported GetMaster function (bug #744881 again).
* Mon Jul 8 2013 Tim Waugh <twaugh@redhat.com> 1.3.0-1
- 1.3.0.