summaryrefslogtreecommitdiff
path: root/sys/dev/wscons
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-06-15 21:35:16 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-06-15 21:35:16 +0000
commit53072f12795625b8945f996652d3935d51f33b51 (patch)
tree4216df967270fec261ecac7a1aa13e47ec7f4ca6 /sys/dev/wscons
parentdf81f8d39f5046efc3238d21bce975ff10d5e7b8 (diff)
When we disable the burner when X is running, also set sc_burnout to 0 to
prevent us from accidentally reenabling the burner. ok miod@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r--sys/dev/wscons/wsdisplay.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 00b1475fe2e..d62d9f75abc 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.109 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.110 2013/06/15 21:35:15 kettenis Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -1157,14 +1157,18 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr,
if (sc->sc_burnman)
wsdisplay_burner(sc);
/* ...and disable the burner while X is running */
- if (sc->sc_burnout)
+ if (sc->sc_burnout) {
timeout_del(&sc->sc_burner);
+ sc->sc_burnout = 0;
+ }
#endif
} else {
#ifdef BURNER_SUPPORT
/* reenable the burner after exiting from X */
- if (!sc->sc_burnman)
+ if (!sc->sc_burnman) {
+ sc->sc_burnout = sc->sc_burnoutintvl;
wsdisplay_burn(sc, sc->sc_burnflags);
+ }
#endif
#ifdef WSMOUSED_SUPPORT