To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84399
Issue #|84399
Summary|Turn off DPMS screensaver during presentation
Component|gsl
Version|OOG680_m2
Platform|All
URL|
OS/Version|Unix, X11
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|PATCH
Priority|P3
Subcomponent|code
Assigned to|pl
Reported by|cosine
------- Additional comments from [EMAIL PROTECTED] Sun Dec 9 22:38:19 +0000
2007 -------
This patch turns off the DPMS screensaver during a presentation (issue 76677).
The patch assumes that the dmps extension is present. That is a good guess
these days, but perhaps some old systems don't have it. Perhaps people who know
more about the building can improve.
xset.c is a good example of DPMS calls.
--- salframe.cxx.org 2007-12-09 11:07:31.000000000 +0000
+++ salframe.cxx 2007-12-09 22:35:47.000000000 +0000
@@ -47,6 +47,7 @@
#include <X11/keysym.h>
#include <FWS.hxx>
#include <X11/extensions/shape.h>
+#include <X11/extensions/dpms.h>
#include <postx.h>
#include <salunx.h>
@@ -2203,7 +2204,22 @@
if( ! bStart && hPresentationWindow != None )
doReparentPresentationDialogues( GetDisplay() );
hPresentationWindow = (bStart && IsOverrideRedirect() ) ? GetWindow() :
None;
- if( bStart || nScreenSaversTimeout_ )
+
+
+ // needs static here to save DPMS settings
+ static BOOL DPMSEnabled;
+ static CARD16 dpms_standby_timeout=0;
+ static CARD16 dpms_suspend_timeout=0;
+ static CARD16 dpms_off_timeout=0;
+ CARD16 state; // card16 is defined in Xdm.h
+
+ int dummy; // see xset.c
+ // get the DPMS state right before the start
+ if (DPMSQueryExtension(GetXDisplay(), &dummy, &dummy)){
+ DPMSInfo(GetXDisplay(), &state, &DPMSEnabled);
+ }
+
+ if( bStart || nScreenSaversTimeout_ || DPMSEnabled)
{
if( hPresentationWindow )
{
@@ -2227,8 +2243,15 @@
prefer_blanking,
allow_exposures );
nScreenSaversTimeout_ = 0;
+
+ if (DPMSEnabled && DPMSQueryExtension(GetXDisplay(),
&dummy, &dummy)){
+ // restore timeouts
+ DPMSSetTimeouts(GetXDisplay(),
dpms_standby_timeout,
+ dpms_suspend_timeout,
dpms_off_timeout);
+ }
+
}
- else if( timeout )
+ else if( timeout || DPMSEnabled)
{
nScreenSaversTimeout_ = timeout;
XResetScreenSaver( GetXDisplay() );
@@ -2237,6 +2260,11 @@
interval,
prefer_blanking,
allow_exposures );
+ if (DPMSEnabled && DPMSQueryExtension(GetXDisplay(),
&dummy, &dummy)){
+ DPMSGetTimeouts(GetXDisplay(),
&dpms_standby_timeout,
+ &dpms_suspend_timeout,
&dpms_off_timeout);
+ DPMSSetTimeouts(GetXDisplay(), 0,0,0);
+ }
}
}
}
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]