From 53072f12795625b8945f996652d3935d51f33b51 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 15 Jun 2013 21:35:16 +0000 Subject: 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@ --- sys/dev/wscons/wsdisplay.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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 -- cgit v1.2.3