aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xfixes')
-rw-r--r--xorg-server/xfixes/cursor.c33
-rw-r--r--xorg-server/xfixes/makefile9
-rw-r--r--xorg-server/xfixes/select.c19
-rw-r--r--xorg-server/xfixes/xfixes.c10
4 files changed, 40 insertions, 31 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 */
diff --git a/xorg-server/xfixes/makefile b/xorg-server/xfixes/makefile
new file mode 100644
index 000000000..73df36c4e
--- /dev/null
+++ b/xorg-server/xfixes/makefile
@@ -0,0 +1,9 @@
+CSRCS = cursor.c \
+ region.c \
+ saveset.c \
+ select.c \
+ xfixes.c
+
+LIBRARY=libxfixes
+
+
diff --git a/xorg-server/xfixes/select.c b/xorg-server/xfixes/select.c
index ee8ed6f68..17fb0b583 100644
--- a/xorg-server/xfixes/select.c
+++ b/xorg-server/xfixes/select.c
@@ -77,16 +77,15 @@ XFixesSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args)
}
for (e = selectionEvents; e; e = e->next) {
if (e->selection == selection->selection && (e->eventMask & eventMask)) {
- xXFixesSelectionNotifyEvent ev = {
- .type = XFixesEventBase + XFixesSelectionNotify,
- .subtype = subtype,
- .window = e->pWindow->drawable.id,
- .owner = (subtype == XFixesSetSelectionOwnerNotify) ?
- selection->window : 0,
- .selection = e->selection,
- .timestamp = currentTime.milliseconds,
- .selectionTimestamp = selection->lastTimeChanged.milliseconds
- };
+ xXFixesSelectionNotifyEvent ev;
+ ev.type = XFixesEventBase + XFixesSelectionNotify;
+ ev.subtype = subtype;
+ ev.window = e->pWindow->drawable.id;
+ ev.owner = (subtype == XFixesSetSelectionOwnerNotify) ?
+ selection->window : 0;
+ ev.selection = e->selection;
+ ev.timestamp = currentTime.milliseconds;
+ ev.selectionTimestamp = selection->lastTimeChanged.milliseconds;
WriteEventsToClient(e->pClient, 1, (xEvent *) &ev);
}
}
diff --git a/xorg-server/xfixes/xfixes.c b/xorg-server/xfixes/xfixes.c
index 52c57dfab..533482c56 100644
--- a/xorg-server/xfixes/xfixes.c
+++ b/xorg-server/xfixes/xfixes.c
@@ -62,15 +62,15 @@ static int
ProcXFixesQueryVersion(ClientPtr client)
{
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
- xXFixesQueryVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0
- };
+ xXFixesQueryVersionReply rep;
REQUEST(xXFixesQueryVersionReq);
REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
+ memset(&rep, 0, sizeof(xXFixesQueryVersionReply));
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
if (version_compare(stuff->majorVersion, stuff->minorVersion,
SERVER_XFIXES_MAJOR_VERSION,