tigervnc/SOURCES/tigervnc-getmaster.patch

89 lines
3.0 KiB
Diff
Raw Normal View History

2020-04-16 20:10:31 +00:00
diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c
2020-11-03 11:59:22 +00:00
index f84a6e4..4eac939 100644
2020-04-16 20:10:31 +00:00
--- a/unix/xserver/hw/vnc/InputXKB.c
+++ b/unix/xserver/hw/vnc/InputXKB.c
2020-11-03 11:59:22 +00:00
@@ -226,10 +226,7 @@ void vncPrepareInputDevices(void)
2020-04-16 20:10:31 +00:00
unsigned vncGetKeyboardState(void)
{
- DeviceIntPtr master;
-
- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
- return XkbStateFieldFromRec(&master->key->xkbInfo->state);
+ return XkbStateFieldFromRec(&vncKeyboardDev->master->key->xkbInfo->state);
}
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
unsigned vncGetLevelThreeMask(void)
2020-11-03 11:59:22 +00:00
@@ -250,7 +247,7 @@ unsigned vncGetLevelThreeMask(void)
2020-04-16 20:10:31 +00:00
return 0;
}
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
2020-11-03 11:59:22 +00:00
@@ -275,7 +272,7 @@ KeyCode vncPressShift(void)
2020-04-16 20:10:31 +00:00
if (state & ShiftMask)
return 0;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
unsigned char mask;
2020-11-03 11:59:22 +00:00
@@ -315,7 +312,7 @@ size_t vncReleaseShift(KeyCode *keys, size_t maxKeys)
2020-04-16 20:10:31 +00:00
count = 0;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
+ master = vncKeyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
2020-11-03 11:59:22 +00:00
@@ -371,7 +368,7 @@ KeyCode vncPressLevelThree(void)
2020-04-16 20:10:31 +00:00
return 0;
}
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
act = XkbKeyActionPtr(xkb, keycode, state);
if (act == NULL)
2020-11-03 11:59:22 +00:00
@@ -402,7 +399,7 @@ size_t vncReleaseLevelThree(KeyCode *keys, size_t maxKeys)
2020-04-16 20:10:31 +00:00
count = 0;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
+ master = vncKeyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
XkbAction *act;
2020-11-03 11:59:22 +00:00
@@ -447,7 +444,7 @@ KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state)
2020-04-16 20:10:31 +00:00
*new_state = state;
2020-11-03 11:59:22 +00:00
fallback = 0;
2020-04-16 20:10:31 +00:00
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
unsigned int state_out;
KeySym dummy;
2020-11-03 11:59:22 +00:00
@@ -551,7 +548,7 @@ int vncIsAffectedByNumLock(KeyCode keycode)
2020-04-16 20:10:31 +00:00
if (numlock_keycode == 0)
return 0;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
+ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
act = XkbKeyActionPtr(xkb, numlock_keycode, state);
if (act == NULL)
2020-11-03 11:59:22 +00:00
@@ -585,7 +582,7 @@ KeyCode vncAddKeysym(KeySym keysym, unsigned state)
2020-04-16 20:10:31 +00:00
KeySym *syms;
KeySym upper, lower;
2020-11-03 11:59:22 +00:00
2020-04-16 20:10:31 +00:00
- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
+ master = vncKeyboardDev->master;
xkb = master->key->xkbInfo->desc;
for (key = xkb->max_key_code; key >= xkb->min_key_code; key--) {
if (XkbKeyNumGroups(xkb, key) == 0)