disable DPMS handling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8479 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-12-16 19:09:34 +00:00
parent 0c71a7f53c
commit f7650ae79f
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,8 @@
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#define ENABLE_DPMS 0
typedef struct typedef struct
{ {
unsigned long flags; unsigned long flags;
@ -869,7 +871,9 @@ void wsFullScreen( wsTWindow * win )
win->Height=win->OldHeight; win->Height=win->OldHeight;
win->isFullScreen=False; win->isFullScreen=False;
decoration=win->Decorations; decoration=win->Decorations;
#ifdef ENABLE_DPMS
wsScreenSaverOn( wsDisplay ); wsScreenSaverOn( wsDisplay );
#endif
} }
else else
{ {
@ -878,7 +882,9 @@ void wsFullScreen( wsTWindow * win )
win->X=0; win->Y=0; win->X=0; win->Y=0;
win->Width=wsMaxX; win->Height=wsMaxY; win->Width=wsMaxX; win->Height=wsMaxY;
win->isFullScreen=True; win->isFullScreen=True;
#ifdef ENABLE_DPMS
wsScreenSaverOff( wsDisplay ); wsScreenSaverOff( wsDisplay );
#endif
} }
win->SizeHint.flags=PPosition | PSize | PWinGravity;// | PBaseSize; win->SizeHint.flags=PPosition | PSize | PWinGravity;// | PBaseSize;
@ -1280,6 +1286,7 @@ void wsSetTitle( wsTWindow * win,char * name )
void wsSetMousePosition( wsTWindow * win,int x, int y ) void wsSetMousePosition( wsTWindow * win,int x, int y )
{ XWarpPointer( wsDisplay,wsRootWin,win->WindowID,0,0,0,0,x,y ); } { XWarpPointer( wsDisplay,wsRootWin,win->WindowID,0,0,0,0,x,y ); }
#ifdef ENABLE_DPMS
static int dpms_disabled=0; static int dpms_disabled=0;
static int timeout_save=0; static int timeout_save=0;
@ -1335,6 +1342,7 @@ void wsScreenSaverOff( Display * mDisplay )
XGetScreenSaver( mDisplay,&timeout_save,&interval,&prefer_blank,&allow_exp ); XGetScreenSaver( mDisplay,&timeout_save,&interval,&prefer_blank,&allow_exp );
if ( timeout_save ) XSetScreenSaver( mDisplay,0,interval,prefer_blank,allow_exp ); // turning off screensaver if ( timeout_save ) XSetScreenSaver( mDisplay,0,interval,prefer_blank,allow_exp ); // turning off screensaver
} }
#endif
void wsSetShape( wsTWindow * win,char * data ) void wsSetShape( wsTWindow * win,char * data )
{ {