aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-07-14 13:44:46 +0200
committerPierre Ossman <ossman@cendio.se>2014-07-14 13:44:46 +0200
commitac38a07d36f18f722295e26ff03391657e08a89c (patch)
treeb5a728af854399cb0cfc185464236a7d2bcb9bc1 /unix/xserver
parentde0b3532320e088440bd7607f7d5d7e8fc720d94 (diff)
downloadtigervnc-ac38a07d36f18f722295e26ff03391657e08a89c.tar.gz
tigervnc-ac38a07d36f18f722295e26ff03391657e08a89c.zip
Remove private storage from InputDevice
We don't need this anymore as we now only have a single InputDevice object and can easily refer to it directly.
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/InputXKB.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/unix/xserver/hw/vnc/InputXKB.cc b/unix/xserver/hw/vnc/InputXKB.cc
index ed93afcc..92288aa4 100644
--- a/unix/xserver/hw/vnc/InputXKB.cc
+++ b/unix/xserver/hw/vnc/InputXKB.cc
@@ -42,18 +42,6 @@ extern "C" {
#undef class
}
-#if XORG < 19
-static int vncXkbScreenPrivateKeyIndex;
-static DevPrivateKey vncXkbScreenPrivateKey = &vncXkbScreenPrivateKeyIndex;
-#else
-static DevPrivateKeyRec vncXkbPrivateKeyRec;
-#define vncXkbScreenPrivateKey (&vncXkbPrivateKeyRec)
-#endif
-
-#define vncXkbScreenPrivate(pScreen) \
- (*(InputDevice**) dixLookupPrivate(&(pScreen)->devPrivates, \
- vncXkbScreenPrivateKey))
-
#ifndef KEYBOARD_OR_FLOAT
#define KEYBOARD_OR_FLOAT MASTER_KEYBOARD
#endif
@@ -209,18 +197,6 @@ static unsigned XkbKeyEffectiveGroup(XkbDescPtr xkb, KeyCode key, unsigned int m
void InputDevice::PrepareInputDevices(void)
{
-#if XORG < 19
- if (!dixRequestPrivate(vncXkbScreenPrivateKey, sizeof(InputDevice*)))
- FatalError("Failed to register TigerVNC XKB screen key\n");
-#else
- if (!dixRegisterPrivateKey(vncXkbScreenPrivateKey, PRIVATE_SCREEN,
- sizeof(InputDevice*)))
- FatalError("Failed to register TigerVNC XKB screen key\n");
-#endif
-
- for (int scr = 0; scr < screenInfo.numScreens; scr++)
- vncXkbScreenPrivate(screenInfo.screens[scr]) = this;
-
/*
* Not ideal since these callbacks do not stack, but it's the only
* decent way we can reliably catch events for both the slave and
@@ -636,10 +612,9 @@ void InputDevice::vncXkbProcessDeviceEvent(int screenNum,
InternalEvent *event,
DeviceIntPtr dev)
{
- InputDevice *self = vncXkbScreenPrivate(screenInfo.screens[screenNum]);
unsigned int backupctrls;
- if (event->device_event.sourceid == self->keyboardDev->id) {
+ if (event->device_event.sourceid == singleton.keyboardDev->id) {
XkbControlsPtr ctrls;
/*
@@ -661,7 +636,7 @@ void InputDevice::vncXkbProcessDeviceEvent(int screenNum,
dev->c_public.processInputProc(event, dev);
- if (event->device_event.sourceid == self->keyboardDev->id) {
+ if (event->device_event.sourceid == singleton.keyboardDev->id) {
XkbControlsPtr ctrls;
ctrls = dev->key->xkbInfo->desc->ctrls;