aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/input/dmxmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/dmx/input/dmxmap.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/dmx/input/dmxmap.c')
-rw-r--r--xorg-server/hw/dmx/input/dmxmap.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/xorg-server/hw/dmx/input/dmxmap.c b/xorg-server/hw/dmx/input/dmxmap.c
index 1eccd3d28..1a8d4c937 100644
--- a/xorg-server/hw/dmx/input/dmxmap.c
+++ b/xorg-server/hw/dmx/input/dmxmap.c
@@ -59,15 +59,16 @@
* remoteEvent is the type returned from the remote server. The \a
* serverEvent is from the XI_* list of events in
* include/extensions/XIproto.h. */
-void dmxMapInsert(DMXLocalInputInfoPtr dmxLocal,
- int remoteEvent, int serverEvent)
+void
+dmxMapInsert(DMXLocalInputInfoPtr dmxLocal, int remoteEvent, int serverEvent)
{
int hash = remoteEvent & DMX_MAP_MASK;
int i;
- /* Return if this has already been mapped */
+ /* Return if this has already been mapped */
if (dmxLocal->map[hash].remote == remoteEvent
- && dmxLocal->map[hash].server == serverEvent) return;
+ && dmxLocal->map[hash].server == serverEvent)
+ return;
if (dmxLocal->map[hash].remote) {
dmxLocal->mapOptimize = 0;
@@ -81,18 +82,21 @@ void dmxMapInsert(DMXLocalInputInfoPtr dmxLocal,
dmxLog(dmxWarning,
"Out of map entries, cannot map remove event type %d\n",
remoteEvent);
- } else {
+ }
+ else {
dmxLocal->map[hash].remote = remoteEvent;
dmxLocal->map[hash].server = serverEvent;
}
}
/** Remove all mappings there were inserted with #dmxMapInsert. */
-void dmxMapClear(DMXLocalInputInfoPtr dmxLocal)
+void
+dmxMapClear(DMXLocalInputInfoPtr dmxLocal)
{
int i;
- for (i = 0; i < DMX_MAP_ENTRIES; i++) dmxLocal->map[i].remote = 0;
+ for (i = 0; i < DMX_MAP_ENTRIES; i++)
+ dmxLocal->map[i].remote = 0;
dmxLocal->mapOptimize = 1;
}
@@ -100,16 +104,18 @@ void dmxMapClear(DMXLocalInputInfoPtr dmxLocal)
* returned from the remote server. The return value is that which was
* passed into #dmxMapInsert (i.e., a value from the XI_* list in
* include/extensions/XIproto.h). If a mapping is not available, -1 is
- * returned. */
-int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent)
+ * returned. */
+int
+dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent)
{
- int hash = remoteEvent & DMX_MAP_MASK;
+ int hash = remoteEvent & DMX_MAP_MASK;
int serverEvent = -1;
int i;
if (dmxLocal->mapOptimize && dmxLocal->map[hash].remote == remoteEvent) {
serverEvent = dmxLocal->map[hash].server;
- } else {
+ }
+ else {
for (i = 0; i < DMX_MAP_ENTRIES; i++)
if (dmxLocal->map[i].remote == remoteEvent) {
serverEvent = dmxLocal->map[hash].server;