diff options
author | marha <marha@users.sourceforge.net> | 2010-09-30 15:43:57 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-30 15:43:57 +0000 |
commit | 54fffe7283b49dcaae81e826eb0dff213552c4ec (patch) | |
tree | c3a8c65ebffb5841251bd16edec93f0576f77418 /xorg-server/Xext/saver.c | |
parent | d718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3 (diff) | |
parent | f952d0d771de6d9b8ecc3cbbe3624203723bbb25 (diff) | |
download | vcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.tar.gz vcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.tar.bz2 vcxsrv-54fffe7283b49dcaae81e826eb0dff213552c4ec.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r-- | xorg-server/Xext/saver.c | 88 |
1 files changed, 33 insertions, 55 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 910bb2e9a..5fd6c895d 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -68,20 +68,6 @@ in this Software without prior written authorization from the X Consortium. static int ScreenSaverEventBase = 0;
-static DISPATCH_PROC(ProcScreenSaverQueryInfo);
-static DISPATCH_PROC(ProcScreenSaverDispatch);
-static DISPATCH_PROC(ProcScreenSaverQueryVersion);
-static DISPATCH_PROC(ProcScreenSaverSelectInput);
-static DISPATCH_PROC(ProcScreenSaverSetAttributes);
-static DISPATCH_PROC(ProcScreenSaverUnsetAttributes);
-static DISPATCH_PROC(ProcScreenSaverSuspend);
-static DISPATCH_PROC(SProcScreenSaverDispatch);
-static DISPATCH_PROC(SProcScreenSaverQueryInfo);
-static DISPATCH_PROC(SProcScreenSaverQueryVersion);
-static DISPATCH_PROC(SProcScreenSaverSelectInput);
-static DISPATCH_PROC(SProcScreenSaverSetAttributes);
-static DISPATCH_PROC(SProcScreenSaverUnsetAttributes);
-static DISPATCH_PROC(SProcScreenSaverSuspend);
static Bool ScreenSaverHandle (
ScreenPtr /* pScreen */,
@@ -243,45 +229,6 @@ static DevPrivateKeyRec ScreenPrivateKeyRec; #define New(t) (malloc(sizeof (t)))
-/****************
- * ScreenSaverExtensionInit
- *
- * Called from InitExtensions in main() or from QueryExtension() if the
- * extension is dynamically loaded.
- *
- ****************/
-
-void
-ScreenSaverExtensionInit(INITARGS)
-{
- ExtensionEntry *extEntry;
- int i;
- ScreenPtr pScreen;
-
- if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
- return;
-
- AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr");
- SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents,
- "SaverEvent");
- SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend,
- "SaverSuspend");
-
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- pScreen = screenInfo.screens[i];
- SetScreenPrivate (pScreen, NULL);
- }
- if (AttrType && SaverEventType && SuspendType &&
- (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0,
- ProcScreenSaverDispatch, SProcScreenSaverDispatch,
- NULL, StandardMinorOpcode)))
- {
- ScreenSaverEventBase = extEntry->eventBase;
- EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
- }
-}
-
static void
CheckScreenPrivate (ScreenPtr pScreen)
{
@@ -1418,7 +1365,7 @@ ProcScreenSaverSuspend (ClientPtr client) return Success;
}
-static DISPATCH_PROC((*NormalVector[])) = {
+static int (*NormalVector[]) (ClientPtr /* client */) = {
ProcScreenSaverQueryVersion,
ProcScreenSaverQueryInfo,
ProcScreenSaverSelectInput,
@@ -1519,7 +1466,7 @@ SProcScreenSaverSuspend (ClientPtr client) return ProcScreenSaverSuspend (client);
}
-static DISPATCH_PROC((*SwappedVector[])) = {
+static int (*SwappedVector[]) (ClientPtr /* client */) = {
SProcScreenSaverQueryVersion,
SProcScreenSaverQueryInfo,
SProcScreenSaverSelectInput,
@@ -1537,3 +1484,34 @@ SProcScreenSaverDispatch (ClientPtr client) return (*SwappedVector[stuff->data])(client);
return BadRequest;
}
+
+void
+ScreenSaverExtensionInit(INITARGS)
+{
+ ExtensionEntry *extEntry;
+ int i;
+ ScreenPtr pScreen;
+
+ if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return;
+
+ AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr");
+ SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents,
+ "SaverEvent");
+ SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend,
+ "SaverSuspend");
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ pScreen = screenInfo.screens[i];
+ SetScreenPrivate (pScreen, NULL);
+ }
+ if (AttrType && SaverEventType && SuspendType &&
+ (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0,
+ ProcScreenSaverDispatch, SProcScreenSaverDispatch,
+ NULL, StandardMinorOpcode)))
+ {
+ ScreenSaverEventBase = extEntry->eventBase;
+ EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
+ }
+}
|