xace: add hooks + new access codes: core protocol screensaver requests

This commit is contained in:
Eamon Walsh
2007-08-16 10:36:05 -04:00
committed by Eamon Walsh
parent 568ae737d1
commit b82557c9fb
17 changed files with 69 additions and 38 deletions

View File

@@ -3369,12 +3369,10 @@ static void DrawLogo(
);
#endif
_X_EXPORT void
SaveScreens(int on, int mode)
_X_EXPORT int
SaveScreens(ClientPtr client, int on, int mode)
{
int i;
int what;
int type;
int rc, i, what, type;
if (on == SCREEN_SAVER_FORCER)
{
@@ -3393,6 +3391,13 @@ SaveScreens(int on, int mode)
if (what == screenIsSaved)
type = SCREEN_SAVER_CYCLE;
}
for (i = 0; i < screenInfo.numScreens; i++) {
rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
DixShowAccess | DixHideAccess);
if (rc != Success)
return rc;
}
for (i = 0; i < screenInfo.numScreens; i++)
{
if (on == SCREEN_SAVER_FORCER)
@@ -3480,6 +3485,7 @@ SaveScreens(int on, int mode)
screenIsSaved = what;
if (mode == ScreenSaverReset)
SetScreenSaverTimer();
return Success;
}
static Bool