Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3024:1a08749aebce | 3025:54fac87e1f34 |
---|---|
167 device->VideoQuit = X11_VideoQuit; | 167 device->VideoQuit = X11_VideoQuit; |
168 device->GetDisplayModes = X11_GetDisplayModes; | 168 device->GetDisplayModes = X11_GetDisplayModes; |
169 device->SetDisplayMode = X11_SetDisplayMode; | 169 device->SetDisplayMode = X11_SetDisplayMode; |
170 device->SetDisplayGammaRamp = X11_SetDisplayGammaRamp; | 170 device->SetDisplayGammaRamp = X11_SetDisplayGammaRamp; |
171 device->GetDisplayGammaRamp = X11_GetDisplayGammaRamp; | 171 device->GetDisplayGammaRamp = X11_GetDisplayGammaRamp; |
172 device->SuspendScreenSaver = X11_SuspendScreenSaver; | |
172 device->PumpEvents = X11_PumpEvents; | 173 device->PumpEvents = X11_PumpEvents; |
173 | 174 |
174 device->CreateWindow = X11_CreateWindow; | 175 device->CreateWindow = X11_CreateWindow; |
175 device->CreateWindowFrom = X11_CreateWindowFrom; | 176 device->CreateWindowFrom = X11_CreateWindowFrom; |
176 device->SetWindowTitle = X11_SetWindowTitle; | 177 device->SetWindowTitle = X11_SetWindowTitle; |
222 data->im = | 223 data->im = |
223 XOpenIM(data->display, NULL, data->classname, data->classname); | 224 XOpenIM(data->display, NULL, data->classname, data->classname); |
224 } | 225 } |
225 #endif | 226 #endif |
226 | 227 |
227 /* Save DPMS and screensaver settings */ | |
228 X11_SaveScreenSaver(data->display, &data->screensaver_timeout, | |
229 &data->dpms_enabled); | |
230 X11_DisableScreenSaver(data->display); | |
231 | |
232 /* Look up some useful Atoms */ | 228 /* Look up some useful Atoms */ |
233 data->WM_DELETE_WINDOW = | 229 data->WM_DELETE_WINDOW = |
234 XInternAtom(data->display, "WM_DELETE_WINDOW", False); | 230 XInternAtom(data->display, "WM_DELETE_WINDOW", False); |
235 | 231 |
236 X11_InitModes(_this); | 232 X11_InitModes(_this); |
258 #ifdef X_HAVE_UTF8_STRING | 254 #ifdef X_HAVE_UTF8_STRING |
259 if (data->im) { | 255 if (data->im) { |
260 XCloseIM(data->im); | 256 XCloseIM(data->im); |
261 } | 257 } |
262 #endif | 258 #endif |
263 X11_RestoreScreenSaver(data->display, data->screensaver_timeout, | |
264 data->dpms_enabled); | |
265 | 259 |
266 X11_QuitModes(_this); | 260 X11_QuitModes(_this); |
267 X11_QuitKeyboard(_this); | 261 X11_QuitKeyboard(_this); |
268 X11_QuitMouse(_this); | 262 X11_QuitMouse(_this); |
269 } | 263 } |