diff options
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r-- | xorg-server/Xi/exevents.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index e9f02072a..f11e09f38 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" @@ -1043,7 +1045,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); @@ -1690,7 +1692,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 { @@ -1720,6 +1722,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; @@ -2726,6 +2730,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) { |