1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00

fix screen saver bug under gui

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4317 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-01-23 15:16:20 +00:00
parent 53ddbc7ccc
commit dc4ee0b259
4 changed files with 8 additions and 17 deletions

View File

@ -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

View File

@ -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();

View File

@ -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<num_buffers;i++ ) deallocate_xvimage( i );

View File

@ -380,9 +380,6 @@ else
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 uint32_t query_format(uint32_t format)
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);