aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/saver.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-30 09:49:59 +0000
committermarha <marha@users.sourceforge.net>2010-09-30 09:49:59 +0000
commitf952d0d771de6d9b8ecc3cbbe3624203723bbb25 (patch)
tree6dd2d11e017529c66f2489000136201829dc3b9d /xorg-server/Xext/saver.c
parentf6ba83c963bf48dfa349ab8c54d1968c4c69f7b8 (diff)
downloadvcxsrv-f952d0d771de6d9b8ecc3cbbe3624203723bbb25.tar.gz
vcxsrv-f952d0d771de6d9b8ecc3cbbe3624203723bbb25.tar.bz2
vcxsrv-f952d0d771de6d9b8ecc3cbbe3624203723bbb25.zip
xserver libX11 xkeyboard-config git update 30/9/2010
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r--xorg-server/Xext/saver.c88
1 files changed, 33 insertions, 55 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index 7ac437d15..3b8b6de59 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -62,20 +62,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 */,
@@ -237,45 +223,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)
{
@@ -1412,7 +1359,7 @@ ProcScreenSaverSuspend (ClientPtr client)
return Success;
}
-static DISPATCH_PROC((*NormalVector[])) = {
+static int (*NormalVector[]) (ClientPtr /* client */) = {
ProcScreenSaverQueryVersion,
ProcScreenSaverQueryInfo,
ProcScreenSaverSelectInput,
@@ -1513,7 +1460,7 @@ SProcScreenSaverSuspend (ClientPtr client)
return ProcScreenSaverSuspend (client);
}
-static DISPATCH_PROC((*SwappedVector[])) = {
+static int (*SwappedVector[]) (ClientPtr /* client */) = {
SProcScreenSaverQueryVersion,
SProcScreenSaverQueryInfo,
SProcScreenSaverSelectInput,
@@ -1531,3 +1478,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;
+ }
+}