mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-03 03:24:39 +00:00
dpms: Consolidate a bunch of stuff into Xext/dpms.c
Most of this is a legacy of the old "extmod" design where you could load _some_ extensions dynamically but only if the server had been built with support for them in the first place. Note that since we now only initialize the DPMS extension if at least one screen supports it, we no longer need DPMSCapableFlag: if it would be false, we would never read its value. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
7f1ef9289d
commit
3360418767
8 changed files with 34 additions and 44 deletions
|
|
@ -93,16 +93,6 @@ CARD32 ScreenSaverInterval;
|
|||
int ScreenSaverBlanking;
|
||||
int ScreenSaverAllowExposures;
|
||||
|
||||
#ifdef DPMSExtension
|
||||
CARD16 DPMSPowerLevel = 0;
|
||||
Bool DPMSDisabledSwitch = FALSE;
|
||||
Bool DPMSCapableFlag = FALSE;
|
||||
CARD32 DPMSStandbyTime;
|
||||
CARD32 DPMSSuspendTime;
|
||||
CARD32 DPMSOffTime;
|
||||
Bool DPMSEnabled;
|
||||
#endif
|
||||
|
||||
CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME;
|
||||
CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL;
|
||||
int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING;
|
||||
|
|
|
|||
13
dix/main.c
13
dix/main.c
|
|
@ -148,11 +148,7 @@ dix_main(int argc, char *argv[], char *envp[])
|
|||
ScreenSaverInterval = defaultScreenSaverInterval;
|
||||
ScreenSaverBlanking = defaultScreenSaverBlanking;
|
||||
ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
|
||||
#ifdef DPMSExtension
|
||||
DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime;
|
||||
DPMSEnabled = TRUE;
|
||||
DPMSPowerLevel = 0;
|
||||
#endif
|
||||
|
||||
InitBlockAndWakeupHandlers();
|
||||
/* Perform any operating system dependent initializations you'd like */
|
||||
OsInit();
|
||||
|
|
@ -239,13 +235,6 @@ dix_main(int argc, char *argv[], char *envp[])
|
|||
defaultCursorFont);
|
||||
}
|
||||
|
||||
#ifdef DPMSExtension
|
||||
/* check all screens, looking for DPMS Capabilities */
|
||||
DPMSCapableFlag = DPMSSupported();
|
||||
if (!DPMSCapableFlag)
|
||||
DPMSEnabled = FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
/*
|
||||
* Consolidate window and colourmap information for each screen
|
||||
|
|
|
|||
Loading…
Reference in a new issue