summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-16 10:36:05 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-16 10:36:05 -0400
commitb82557c9fb60f11fd2696c8fb2ae17b9dfd915ed (patch)
treed21b202f1b12078d2ca46e7b2de2445fc4df38d0 /dix/window.c
parent568ae737d1d5d476a0bf85659d88910c4e0ef5e0 (diff)
xace: add hooks + new access codes: core protocol screensaver requests
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/dix/window.c b/dix/window.c
index 9d1947a53..597c55dbb 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -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