diff options
Diffstat (limited to 'xorg-server/xfixes/cursor.c')
-rw-r--r-- | xorg-server/xfixes/cursor.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index bd175b40f..360d7ed7f 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -44,6 +44,8 @@ #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define XFIXES #endif #include "xfixesint.h" @@ -175,14 +177,13 @@ CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) CursorCurrent[pDev->id] = pCursor; for (e = cursorEvents; e; e = e->next) { if ((e->eventMask & XFixesDisplayCursorNotifyMask)) { - xXFixesCursorNotifyEvent ev = { - .type = XFixesEventBase + XFixesCursorNotify, - .subtype = XFixesDisplayCursorNotify, - .window = e->pWindow->drawable.id, - .cursorSerial = pCursor ? pCursor->serialNumber : 0, - .timestamp = currentTime.milliseconds, - .name = pCursor ? pCursor->name : None - }; + xXFixesCursorNotifyEvent ev; + ev.type = XFixesEventBase + XFixesCursorNotify; + ev.subtype = XFixesDisplayCursorNotify; + ev.window = e->pWindow->drawable.id; + ev.cursorSerial = pCursor ? pCursor->serialNumber : 0; + ev.timestamp = currentTime.milliseconds; + ev.name = pCursor ? pCursor->name : None; WriteEventsToClient(e->pClient, 1, (xEvent *) &ev); } } @@ -477,13 +478,13 @@ ProcXFixesGetCursorName(ClientPtr client) str = ""; len = strlen(str); - reply = (xXFixesGetCursorNameReply) { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = bytes_to_int32(len), - .atom = pCursor->name, - .nbytes = len - }; + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = bytes_to_int32(len); + reply.atom = pCursor->name; + reply.nbytes = len; + if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); @@ -1175,7 +1176,7 @@ barrier_find_nearest(CursorScreenPtr cs, DeviceIntPtr dev, int dir, int x1, int y1, int x2, int y2) { - struct PointerBarrierClient *c; + struct PointerBarrierClient *c = NULL; struct PointerBarrier *nearest = NULL; double min_distance = INT_MAX; /* can't get higher than that in X anyway */ |