aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/saver.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r--xorg-server/Xext/saver.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index f73e2a21f..7e071048f 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -28,6 +28,12 @@ in this Software without prior written authorization from the X Consortium.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define SCREENSAVER
+#endif
+
+#ifdef CreateWindow
+#undef CreateWindow
#endif
#include <X11/X.h>
@@ -426,15 +432,14 @@ SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced)
kind = ScreenSaverInternal;
for (pEv = pPriv->events; pEv; pEv = pEv->next) {
if (pEv->mask & mask) {
- xScreenSaverNotifyEvent ev = {
- .type = ScreenSaverNotify + ScreenSaverEventBase,
- .state = state,
- .timestamp = currentTime.milliseconds,
- .root = pScreen->root->drawable.id,
- .window = pScreen->screensaver.wid,
- .kind = kind,
- .forced = forced
- };
+ xScreenSaverNotifyEvent ev;
+ ev.type = ScreenSaverNotify + ScreenSaverEventBase;
+ ev.state = state;
+ ev.timestamp = currentTime.milliseconds;
+ ev.root = pScreen->root->drawable.id;
+ ev.window = pScreen->screensaver.wid;
+ ev.kind = kind;
+ ev.forced = forced;
WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
}
}
@@ -637,16 +642,14 @@ ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force)
static int
ProcScreenSaverQueryVersion(ClientPtr client)
{
- xScreenSaverQueryVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .majorVersion = SERVER_SAVER_MAJOR_VERSION,
- .minorVersion = SERVER_SAVER_MINOR_VERSION
- };
+ xScreenSaverQueryVersionReply rep;
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
-
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
+ rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -682,12 +685,12 @@ ProcScreenSaverQueryInfo(ClientPtr client)
UpdateCurrentTime();
lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds;
- rep = (xScreenSaverQueryInfoReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .window = pSaver->wid
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.window = pSaver->wid;
+
if (screenIsSaved != SCREEN_SAVER_OFF) {
rep.state = ScreenSaverOn;
if (ScreenSaverTime)