1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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)
|