changeset 4316:9f8a618e87c3

fix screen saver bug under gui
author pontscho
date Wed, 23 Jan 2002 15:16:20 +0000
parents 0d5cba15772b
children 0cf9e05f6de2
files libvo/vo_x11.c libvo/vo_xmga.c libvo/vo_xv.c libvo/vo_xvidix.c
diffstat 4 files changed, 8 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_x11.c	Wed Jan 23 14:11:19 2002 +0000
+++ b/libvo/vo_x11.c	Wed Jan 23 15:16:20 2002 +0000
@@ -431,8 +431,8 @@
 #endif 
   {
    XSelectInput( mDisplay,mywindow,StructureNotifyMask | KeyPressMask );
-   saver_off(mDisplay);
   }
+ saver_off(mDisplay);
  return 0;
 }
 
@@ -579,11 +579,11 @@
 static void
 uninit(void)
 {
+ saver_on(mDisplay); // screen saver back on
 #ifdef HAVE_NEW_GUI
  if ( vo_window == None )
 #endif
  {
-  saver_on(mDisplay); // screen saver back on
   XDestroyWindow( mDisplay,mywindow );
  } 
 #ifdef HAVE_XF86VM
--- a/libvo/vo_xmga.c	Wed Jan 23 14:11:19 2002 +0000
+++ b/libvo/vo_xmga.c	Wed Jan 23 15:16:20 2002 +0000
@@ -368,11 +368,8 @@
    XFlush( mDisplay );
    XSync( mDisplay,False );
  }
- 
-#ifdef HAVE_NEW_GUI
- if ( vo_window == None )
-#endif
-  saver_off(mDisplay);
+
+ saver_off(mDisplay);
 
  return 0;
 }
@@ -384,11 +381,11 @@
 static void
 uninit(void)
 {
+ saver_on(mDisplay);
 #ifdef HAVE_NEW_GUI
  if ( vo_window == None )
 #endif
  {
-  saver_on(mDisplay);
   XDestroyWindow( mDisplay,mWindow );
  }
  mga_uninit();
--- a/libvo/vo_xv.c	Wed Jan 23 14:11:19 2002 +0000
+++ b/libvo/vo_xv.c	Wed Jan 23 15:16:20 2002 +0000
@@ -377,10 +377,7 @@
        drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
        printf( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
       }
-#ifdef HAVE_NEW_GUI
-     if ( vo_window == None )
-#endif
-      saver_off(mDisplay);  // turning off screen saver
+     saver_off(mDisplay);  // turning off screen saver
      return 0;
     }
   }
@@ -585,11 +582,11 @@
 static void uninit(void) 
 {
  int i;
+ saver_on(mDisplay); // screen saver back on
 #ifdef HAVE_NEW_GUI
  if ( vo_window == None )
 #endif
  {
-  saver_on(mDisplay); // screen saver back on
   XDestroyWindow( mDisplay,mywindow );
  }
  for( i=0;i<num_buffers;i++ ) deallocate_xvimage( i );
--- a/libvo/vo_xvidix.c	Wed Jan 23 14:11:19 2002 +0000
+++ b/libvo/vo_xvidix.c	Wed Jan 23 15:16:20 2002 +0000
@@ -380,9 +380,6 @@
 	XSync(mDisplay, False);
     }
 
-#ifdef HAVE_NEW_GUI
-    if (vo_window == None)
-#endif
     saver_off(mDisplay); /* turning off screen saver */
 
     return(0);
@@ -468,12 +465,12 @@
 static void uninit(void)
 {
     vidix_term();
+    saver_on(mDisplay); /* screen saver back on */
 #ifdef HAVE_NEW_GUI
     /* destroy window only if it's not controlled by GUI */
     if (vo_window == None)
 #endif
     {
-	saver_on(mDisplay); /* screen saver back on */
 	if (!(WinID > 0)) /* don't destory window if -wid specified */
 	{
 	    XDestroyWindow(mDisplay, mWindow);