aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 58fe49363..6d5443341 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -80,6 +80,8 @@ SOFTWARE.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define XINPUT
#endif
#include "inputstr.h"
@@ -1019,7 +1021,7 @@ DeliverOneTouchEvent(ClientPtr client, DeviceIntPtr dev, TouchPointInfoPtr ti,
err = EventToXI2(ev, &xi2);
if (err != Success)
FatalError("[Xi] %s: XI2 conversion failed in %s"
- " (%d)\n", dev->name, __func__, err);
+ " (%d)\n", dev->name, __FUNCTION__, err);
FixUpEventFromWindow(&ti->sprite, xi2, win, child, FALSE);
filter = GetEventFilter(dev, xi2);
@@ -1669,7 +1671,7 @@ ProcessBarrierEvent(InternalEvent *e, DeviceIntPtr dev)
rc = EventToXI2(e, &ev);
if (rc != Success) {
- ErrorF("[Xi] event conversion from %s failed with code %d\n", __func__, rc);
+ ErrorF("[Xi] event conversion from %s failed with code %d\n", __FUNCTION__, rc);
return;
}
@@ -1709,7 +1711,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
if (IsPointerDevice(device)) {
kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
mouse = device;
- if (!kbd->key) /* can happen with floating SDs */
+ if (kbd && !kbd->key) /* can happen with floating SDs */
kbd = NULL;
}
else {
@@ -1739,6 +1741,8 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
case ET_KeyRelease:
case ET_ProximityIn:
case ET_ProximityOut:
+ if (!device->spriteInfo->sprite)
+ return;
GetSpritePosition(device, &rootX, &rootY);
event->root_x = rootX;
event->root_y = rootY;
@@ -2525,6 +2529,10 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin)
}
}
+#ifdef _MSC_VER
+#pragma warning(disable:4715) /* Not all control paths return a value */
+#endif
+
int
InputClientGone(WindowPtr pWin, XID id)
{