Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1159
diff -u -r1.1159 configure
--- configure	4 Apr 2006 05:09:12 -0000	1.1159
+++ configure	10 Apr 2006 17:50:18 -0000
@@ -6802,6 +6802,30 @@
 fi
 echores "$_gethostbyname2"
 
+echocheck "XScreenSaverSuspend"
+cat > $TMPC << EOF
+#include <X11/Xlib.h>
+#include <X11/extensions/scrnsaver.h>
+int main(void) {
+    XScreenSaverSuspend(NULL,True);
+    return 0;
+}
+EOF
+
+_xss_suspend=no
+_ld_xss='-lXss'
+if cc_check $_inc_x11 $_ld_x11 $_ld_xss; then
+ _xss_suspend=yes
+fi
+
+if test "$_xss_suspend" = yes ; then
+  _def_xss_suspend='#define HAVE_XSCREENSAVER_SUSPEND 1'
+else
+  _def_xss_suspend='#undef HAVE_XSCREENSAVER_SUSPEND'
+  _ld_xss=''
+fi
+echores "$_xss_suspend"
+
 # --------------- GUI specific tests begin -------------------
 echocheck "GUI"
 echo "$_gui"
@@ -7260,6 +7284,7 @@
 
 # video output
 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
+XSS_LIB = $_ld_xss
 GGI_LIB = $_ld_ggi
 MLIB_LIB =  $_ld_mlib
 MLIB_INC = $_inc_mlib
@@ -8016,6 +8041,9 @@
 /* do we have gethostbyname2? */
 $_def_gethostbyname2
 
+/* XScreenSaverSuspend support */
+$_def_xss_suspend
+
 /* Extension defines */
 $_def_3dnow	// only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
 $_def_3dnowex	// only define if you have 3DNOWEX (AMD Athlon, etc.)
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.366
diff -u -r1.366 Makefile
--- Makefile	4 Apr 2006 06:48:14 -0000	1.366
+++ Makefile	10 Apr 2006 17:50:20 -0000
@@ -74,6 +74,7 @@
           $(DIRECTFB_LIB) \
           $(CACA_LIB) \
 	  $(VESA_LIB) \
+          $(XSS_LIB) \
 
 ifeq ($(EXTERNAL_VIDIX),yes)
 VO_LIBS += $(EXTERNAL_VIDIX_LIB)
Index: libvo/x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.205
diff -u -r1.205 x11_common.c
--- libvo/x11_common.c	4 Mar 2006 17:33:56 -0000	1.205
+++ libvo/x11_common.c	10 Apr 2006 17:50:34 -0000
@@ -27,6 +27,10 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 
+#ifdef HAVE_XSCREENSAVER_SUSPEND
+#include <X11/extensions/scrnsaver.h>
+#endif
+
 #ifdef HAVE_XDPMS
 #include <X11/extensions/dpms.h>
 #endif
@@ -1621,6 +1625,10 @@
 
 void saver_on(Display * mDisplay)
 {
+#ifdef HAVE_XSCREENSAVER_SUSPEND
+    XScreenSaverSuspend(mDisplay, False);
+    return;
+#endif
 
 #ifdef HAVE_XDPMS
     int nothing;
@@ -1684,6 +1692,11 @@
 
     int interval, prefer_blank, allow_exp;
 
+#ifdef HAVE_XSCREENSAVER_SUSPEND
+    XScreenSaverSuspend(mDisplay, True);
+    return;
+#endif
+
 #ifdef HAVE_XDPMS
     int nothing;
 
