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];
|
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||||
DPMSPtr pDPMS;
|
DPMSPtr pDPMS;
|
||||||
pointer DPMSOpt;
|
pointer DPMSOpt;
|
||||||
MessageType enabled_from = X_INFO;
|
MessageType enabled_from;
|
||||||
|
|
||||||
DPMSKey = &DPMSKeyIndex;
|
DPMSKey = &DPMSKeyIndex;
|
||||||
|
|
||||||
|
@ -75,23 +75,22 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
|
||||||
pScrn->DPMSSet = set;
|
pScrn->DPMSSet = set;
|
||||||
pDPMS->Flags = flags;
|
pDPMS->Flags = flags;
|
||||||
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
|
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
|
||||||
if (DPMSOpt) {
|
if (DPMSEnabledSwitch || DPMSDisabledSwitch) {
|
||||||
if ((pDPMS->Enabled
|
enabled_from = X_CMDLINE;
|
||||||
= xf86SetBoolOption(pScrn->options, "dpms", FALSE))
|
DPMSEnabled = !DPMSDisabledSwitch && DPMSEnabledSwitch;
|
||||||
&& !DPMSDisabledSwitch)
|
|
||||||
DPMSEnabled = TRUE;
|
|
||||||
enabled_from = X_CONFIG;
|
|
||||||
xf86MarkOptionUsed(DPMSOpt);
|
|
||||||
} else if (DPMSEnabledSwitch) {
|
|
||||||
if (!DPMSDisabledSwitch)
|
|
||||||
DPMSEnabled = TRUE;
|
|
||||||
pDPMS->Enabled = TRUE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
pDPMS->Enabled = defaultDPMSEnabled;
|
|
||||||
}
|
}
|
||||||
if (pDPMS->Enabled)
|
else if (DPMSOpt) {
|
||||||
|
enabled_from = X_CONFIG;
|
||||||
|
DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
|
||||||
|
xf86MarkOptionUsed(DPMSOpt);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
enabled_from = X_DEFAULT;
|
||||||
|
DPMSEnabled = defaultDPMSEnabled;
|
||||||
|
}
|
||||||
|
if (DPMSEnabled)
|
||||||
xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
|
xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
|
||||||
|
pDPMS->Enabled = DPMSEnabled;
|
||||||
pDPMS->CloseScreen = pScreen->CloseScreen;
|
pDPMS->CloseScreen = pScreen->CloseScreen;
|
||||||
pScreen->CloseScreen = DPMSClose;
|
pScreen->CloseScreen = DPMSClose;
|
||||||
DPMSCount++;
|
DPMSCount++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user