diff options
Diffstat (limited to 'xorg-server/xfixes/cursor.c')
-rw-r--r-- | xorg-server/xfixes/cursor.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 2c4b57c13..0db6b4ab1 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" @@ -156,14 +158,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); } } @@ -456,13 +457,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); |