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 6ed499142..2a097d74f 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); @@ -1661,7 +1663,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 { @@ -1691,6 +1693,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; @@ -2468,6 +2472,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) { |