From dc4ee0b259625af9e5949f2d18f9ad49d2389a15 Mon Sep 17 00:00:00 2001 From: pontscho Date: Wed, 23 Jan 2002 15:16:20 +0000 Subject: [PATCH] fix screen saver bug under gui git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4317 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 4 ++-- libvo/vo_xmga.c | 9 +++------ libvo/vo_xv.c | 7 ++----- libvo/vo_xvidix.c | 5 +---- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index c61ca9daaa..5ce49c65a4 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -431,8 +431,8 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d #endif { XSelectInput( mDisplay,mywindow,StructureNotifyMask | KeyPressMask ); - saver_off(mDisplay); } + saver_off(mDisplay); return 0; } @@ -579,11 +579,11 @@ static uint32_t query_format( uint32_t format ) 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 diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index aae70fc4d4..78529832c4 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -368,11 +368,8 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_ 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 const vo_info_t* get_info( void ) static void uninit(void) { + saver_on(mDisplay); #ifdef HAVE_NEW_GUI if ( vo_window == None ) #endif { - saver_on(mDisplay); XDestroyWindow( mDisplay,mWindow ); } mga_uninit(); diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 5357f5f2f8..31b2669240 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -377,10 +377,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t 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 uint32_t query_format(uint32_t format) 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 0)) /* don't destory window if -wid specified */ { XDestroyWindow(mDisplay, mWindow);