src/video/x11/SDL_x11events.c
branchSDL-1.2
changeset 3936 c5c3c772f5aa
parent 1792 409974dedf2e
child 3978 b966761fef6c
     1.1 --- a/src/video/x11/SDL_x11events.c	Wed Apr 04 10:34:42 2007 +0000
     1.2 +++ b/src/video/x11/SDL_x11events.c	Fri Apr 06 20:30:41 2007 +0000
     1.3 @@ -1136,9 +1136,14 @@
     1.4  #endif /* SDL_VIDEO_DRIVER_X11_DPMS */
     1.5  }
     1.6  
     1.7 -void X11_DisableScreenSaver(Display *display)
     1.8 +void X11_DisableScreenSaver(_THIS, Display *display)
     1.9  {
    1.10  	int timeout, interval, prefer_blank, allow_exp;
    1.11 +
    1.12 +	if (this->hidden->allow_screensaver) {
    1.13 +		return;
    1.14 +	}
    1.15 +
    1.16  	XGetScreenSaver(display, &timeout, &interval, &prefer_blank, &allow_exp);
    1.17  	timeout = 0;
    1.18  	XSetScreenSaver(display, timeout, interval, prefer_blank, allow_exp);
    1.19 @@ -1153,9 +1158,14 @@
    1.20  #endif /* SDL_VIDEO_DRIVER_X11_DPMS */
    1.21  }
    1.22  
    1.23 -void X11_RestoreScreenSaver(Display *display, int saved_timeout, BOOL dpms)
    1.24 +void X11_RestoreScreenSaver(_THIS, Display *display, int saved_timeout, BOOL dpms)
    1.25  {
    1.26  	int timeout, interval, prefer_blank, allow_exp;
    1.27 +
    1.28 +	if (this->hidden->allow_screensaver) {
    1.29 +		return;
    1.30 +	}
    1.31 +
    1.32  	XGetScreenSaver(display, &timeout, &interval, &prefer_blank, &allow_exp);
    1.33  	timeout = saved_timeout;
    1.34  	XSetScreenSaver(display, timeout, interval, prefer_blank, allow_exp);