summaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-01-29 10:14:57 +0100
committerPierre Ossman <ossman@cendio.se>2015-01-29 10:14:57 +0100
commitb9216b37ad51c161154f75d6d81c6290df20ff4f (patch)
tree064af52e2a6bdfcea8e59f5a5ab8aff8103a2c6a /unix/xserver
parent42e57a2fee608d2c51ca22cc4d7b632c085bcb23 (diff)
downloadtigervnc-b9216b37ad51c161154f75d6d81c6290df20ff4f.tar.gz
tigervnc-b9216b37ad51c161154f75d6d81c6290df20ff4f.zip
Restructure code a bit to avoid warning about unused variable
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/InputXKB.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c
index e639d5ee..8d7ae569 100644
--- a/unix/xserver/hw/vnc/InputXKB.c
+++ b/unix/xserver/hw/vnc/InputXKB.c
@@ -628,35 +628,32 @@ static void vncXkbProcessDeviceEvent(int screenNum,
DeviceIntPtr dev)
{
unsigned int backupctrls;
+ XkbControlsPtr ctrls;
- if (event->device_event.sourceid == vncKeyboardDev->id) {
- XkbControlsPtr ctrls;
+ if (event->device_event.sourceid != vncKeyboardDev->id) {
+ dev->public.processInputProc(event, dev);
+ return;
+ }
- /*
- * We need to bypass AccessX since it is timing sensitive and
- * the network can cause fake event delays.
- */
- ctrls = dev->key->xkbInfo->desc->ctrls;
- backupctrls = ctrls->enabled_ctrls;
- ctrls->enabled_ctrls &= ~XkbAllFilteredEventsMask;
+ /*
+ * We need to bypass AccessX since it is timing sensitive and
+ * the network can cause fake event delays.
+ */
+ ctrls = dev->key->xkbInfo->desc->ctrls;
+ backupctrls = ctrls->enabled_ctrls;
+ ctrls->enabled_ctrls &= ~XkbAllFilteredEventsMask;
- /*
- * This flag needs to be set for key repeats to be properly
- * respected.
- */
- if ((event->device_event.type == ET_KeyPress) &&
- key_is_down(dev, event->device_event.detail.key, KEY_PROCESSED))
- event->device_event.key_repeat = TRUE;
- }
+ /*
+ * This flag needs to be set for key repeats to be properly
+ * respected.
+ */
+ if ((event->device_event.type == ET_KeyPress) &&
+ key_is_down(dev, event->device_event.detail.key, KEY_PROCESSED))
+ event->device_event.key_repeat = TRUE;
dev->public.processInputProc(event, dev);
- if (event->device_event.sourceid == vncKeyboardDev->id) {
- XkbControlsPtr ctrls;
-
- ctrls = dev->key->xkbInfo->desc->ctrls;
- ctrls->enabled_ctrls = backupctrls;
- }
+ ctrls->enabled_ctrls = backupctrls;
}
#endif /* XORG >= 117 */