Kaydet (Commit) 0862d285 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

#i10000#: disable use of dpms on SOLARIS (as done on mws_ooh680).

üst 85c1b003
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: salframe.cxx,v $ * $RCSfile: salframe.cxx,v $
* *
* $Revision: 1.221 $ * $Revision: 1.222 $
* *
* last change: $Author: rt $ $Date: 2008-01-29 16:23:42 $ * last change: $Author: rt $ $Date: 2008-01-30 09:12:30 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
#include <X11/keysym.h> #include <X11/keysym.h>
#include <FWS.hxx> #include <FWS.hxx>
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#ifndef SOLARIS
#include <X11/extensions/dpms.h> #include <X11/extensions/dpms.h>
#endif
#include <postx.h> #include <postx.h>
#include <salunx.h> #include <salunx.h>
...@@ -2266,8 +2268,16 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2266,8 +2268,16 @@ void X11SalFrame::StartPresentation( BOOL bStart )
// needs static here to save DPMS settings // needs static here to save DPMS settings
int dummy; int dummy;
static bool DPMSExtensionAvailable =
#ifndef SOLARIS
(DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0);
static XLIB_BOOL DPMSEnabled = false; static XLIB_BOOL DPMSEnabled = false;
static bool DPMSExtensionAvailable = (DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0); #else
false;
bool DPMSEnabled = false;
(void)dummy;
#define CARD16 unsigned short
#endif
static CARD16 dpms_standby_timeout=0; static CARD16 dpms_standby_timeout=0;
static CARD16 dpms_suspend_timeout=0; static CARD16 dpms_suspend_timeout=0;
static CARD16 dpms_off_timeout=0; static CARD16 dpms_off_timeout=0;
...@@ -2294,10 +2304,12 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2294,10 +2304,12 @@ void X11SalFrame::StartPresentation( BOOL bStart )
// get the DPMS state right before the start // get the DPMS state right before the start
if (DPMSExtensionAvailable) if (DPMSExtensionAvailable)
{ {
#ifndef SOLARIS
CARD16 state; // card16 is defined in Xdm.h CARD16 state; // card16 is defined in Xdm.h
DPMSInfo( GetXDisplay(), DPMSInfo( GetXDisplay(),
&state, &state,
&DPMSEnabled); &DPMSEnabled);
#endif
} }
if( bStart ) // start show if( bStart ) // start show
{ {
...@@ -2311,6 +2323,7 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2311,6 +2323,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
prefer_blanking, prefer_blanking,
allow_exposures ); allow_exposures );
} }
#ifndef SOLARIS
if( DPMSEnabled ) if( DPMSEnabled )
{ {
if ( DPMSExtensionAvailable ) if ( DPMSExtensionAvailable )
...@@ -2322,6 +2335,7 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2322,6 +2335,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
DPMSSetTimeouts(GetXDisplay(), 0,0,0); DPMSSetTimeouts(GetXDisplay(), 0,0,0);
} }
} }
#endif
} }
else // if( !bStart ) // end of show else // if( !bStart ) // end of show
{ {
...@@ -2334,6 +2348,7 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2334,6 +2348,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
allow_exposures ); allow_exposures );
nScreenSaversTimeout_ = 0; nScreenSaversTimeout_ = 0;
} }
#ifndef SOLARIS
if ( DPMSEnabled ) if ( DPMSEnabled )
{ {
if ( DPMSExtensionAvailable ) if ( DPMSExtensionAvailable )
...@@ -2343,6 +2358,7 @@ void X11SalFrame::StartPresentation( BOOL bStart ) ...@@ -2343,6 +2358,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
dpms_suspend_timeout, dpms_off_timeout); dpms_suspend_timeout, dpms_off_timeout);
} }
} }
#endif
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment