diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
commit | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch) | |
tree | 21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/Xext/saver.c | |
parent | 75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff) | |
parent | d137057fd13e83ec15ab416c7fe774741da06047 (diff) | |
download | vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2 vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/Xext/shm.c
xorg-server/Xext/sync.c
xorg-server/Xext/xf86bigfont.c
xorg-server/Xi/opendev.c
xorg-server/dix/dispatch.c
xorg-server/include/globals.h
xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r-- | xorg-server/Xext/saver.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 6c8fc6e0b..b0314faad 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -64,7 +64,7 @@ in this Software without prior written authorization from the X Consortium. #include <stdio.h> -#include "modinit.h" +#include "extinit.h" static int ScreenSaverEventBase = 0; @@ -412,7 +412,6 @@ SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced) ScreenSaverScreenPrivatePtr pPriv; ScreenSaverEventPtr pEv; unsigned long mask; - xScreenSaverNotifyEvent ev; int kind; UpdateCurrentTimeIf(); @@ -430,16 +429,17 @@ SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced) else kind = ScreenSaverInternal; for (pEv = pPriv->events; pEv; pEv = pEv->next) { - if (!(pEv->mask & mask)) - continue; - 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); + if (pEv->mask & mask) { + 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); + } } } @@ -652,7 +652,7 @@ ProcScreenSaverQueryVersion(ClientPtr client) swaps(&rep.sequenceNumber); swapl(&rep.length); } - WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), (char *) &rep); + WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep); return Success; } @@ -683,10 +683,12 @@ ProcScreenSaverQueryInfo(ClientPtr client) UpdateCurrentTime(); lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds; + rep.type = X_Reply; - rep.length = 0; rep.sequenceNumber = client->sequence; + rep.length = 0; rep.window = pSaver->wid; + if (screenIsSaved != SCREEN_SAVER_OFF) { rep.state = ScreenSaverOn; if (ScreenSaverTime) @@ -723,7 +725,7 @@ ProcScreenSaverQueryInfo(ClientPtr client) swapl(&rep.idle); swapl(&rep.eventMask); } - WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), (char *) &rep); + WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), &rep); return Success; } @@ -1390,7 +1392,7 @@ SProcScreenSaverDispatch(ClientPtr client) } void -ScreenSaverExtensionInit(INITARGS) +ScreenSaverExtensionInit(void) { ExtensionEntry *extEntry; int i; |