Blame SOURCES/tigervnc-getmaster.patch

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