diff src/video/x11/SDL_x11video.c @ 3025:54fac87e1f34

Added an API to enable/disable the screen saver. The screensaver is disabled by default when using SDL 1.2 compatibility. Use the new XScreenSaver extension, removed unused DPMS extension.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 12 Jan 2009 06:19:05 +0000
parents 8cc00819c8d6
children 089a77aebb7d
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c	Sun Jan 11 23:56:19 2009 +0000
+++ b/src/video/x11/SDL_x11video.c	Mon Jan 12 06:19:05 2009 +0000
@@ -169,6 +169,7 @@
     device->SetDisplayMode = X11_SetDisplayMode;
     device->SetDisplayGammaRamp = X11_SetDisplayGammaRamp;
     device->GetDisplayGammaRamp = X11_GetDisplayGammaRamp;
+    device->SuspendScreenSaver = X11_SuspendScreenSaver;
     device->PumpEvents = X11_PumpEvents;
 
     device->CreateWindow = X11_CreateWindow;
@@ -224,11 +225,6 @@
     }
 #endif
 
-    /* Save DPMS and screensaver settings */
-    X11_SaveScreenSaver(data->display, &data->screensaver_timeout,
-                        &data->dpms_enabled);
-    X11_DisableScreenSaver(data->display);
-
     /* Look up some useful Atoms */
     data->WM_DELETE_WINDOW =
         XInternAtom(data->display, "WM_DELETE_WINDOW", False);
@@ -260,8 +256,6 @@
         XCloseIM(data->im);
     }
 #endif
-    X11_RestoreScreenSaver(data->display, data->screensaver_timeout,
-                           data->dpms_enabled);
 
     X11_QuitModes(_this);
     X11_QuitKeyboard(_this);