Honour Option "DPMS" "off" on xorg.conf
Signed-off-by: James Cloos <cloos@jhcloos.com>
This commit is contained in:
parent
7abb72c5c7
commit
544cd9e7b5
|
@ -61,7 +61,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
|
|||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
DPMSPtr pDPMS;
|
||||
pointer DPMSOpt;
|
||||
MessageType enabled_from = X_INFO;
|
||||
MessageType enabled_from;
|
||||
|
||||
DPMSKey = &DPMSKeyIndex;
|
||||
|
||||
|
@ -75,23 +75,22 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
|
|||
pScrn->DPMSSet = set;
|
||||
pDPMS->Flags = flags;
|
||||
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
|
||||
if (DPMSOpt) {
|
||||
if ((pDPMS->Enabled
|
||||
= xf86SetBoolOption(pScrn->options, "dpms", FALSE))
|
||||
&& !DPMSDisabledSwitch)
|
||||
DPMSEnabled = TRUE;
|
||||
if (DPMSEnabledSwitch || DPMSDisabledSwitch) {
|
||||
enabled_from = X_CMDLINE;
|
||||
DPMSEnabled = !DPMSDisabledSwitch && DPMSEnabledSwitch;
|
||||
}
|
||||
else if (DPMSOpt) {
|
||||
enabled_from = X_CONFIG;
|
||||
DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
|
||||
xf86MarkOptionUsed(DPMSOpt);
|
||||
} else if (DPMSEnabledSwitch) {
|
||||
if (!DPMSDisabledSwitch)
|
||||
DPMSEnabled = TRUE;
|
||||
pDPMS->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
pDPMS->Enabled = defaultDPMSEnabled;
|
||||
enabled_from = X_DEFAULT;
|
||||
DPMSEnabled = defaultDPMSEnabled;
|
||||
}
|
||||
if (pDPMS->Enabled)
|
||||
if (DPMSEnabled)
|
||||
xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
|
||||
pDPMS->Enabled = DPMSEnabled;
|
||||
pDPMS->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = DPMSClose;
|
||||
DPMSCount++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user