From b829336353af799dc56bc1ca8e5dae1c001e29f1 Mon Sep 17 00:00:00 2001 From: des Date: Fri, 17 Apr 1998 10:03:11 +0000 Subject: [PATCH] Stop the screensaver before switching consoles. --- sys/dev/syscons/syscons.c | 8 +++++++- sys/i386/isa/syscons.c | 8 +++++++- sys/isa/syscons.c | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index dd251c6953bb..139760c58d0f 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.258 1998/04/04 16:26:53 yokota Exp $ + * $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $ */ #include "sc.h" @@ -2532,11 +2532,17 @@ switch_scr(scr_stat *scp, u_int next_scr) return EINVAL; } } + /* delay switch if actively updating screen */ if (write_in_progress || blink_in_progress) { delayed_next_scr = next_scr+1; return 0; } + + /* Stop the screensaver */ + if (scrn_blanked > 0) + stop_scrn_saver(current_saver); + switch_in_progress = TRUE; old_scp = cur_console; new_scp = console[next_scr]; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index dd251c6953bb..139760c58d0f 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.258 1998/04/04 16:26:53 yokota Exp $ + * $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $ */ #include "sc.h" @@ -2532,11 +2532,17 @@ switch_scr(scr_stat *scp, u_int next_scr) return EINVAL; } } + /* delay switch if actively updating screen */ if (write_in_progress || blink_in_progress) { delayed_next_scr = next_scr+1; return 0; } + + /* Stop the screensaver */ + if (scrn_blanked > 0) + stop_scrn_saver(current_saver); + switch_in_progress = TRUE; old_scp = cur_console; new_scp = console[next_scr]; diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index dd251c6953bb..139760c58d0f 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.258 1998/04/04 16:26:53 yokota Exp $ + * $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $ */ #include "sc.h" @@ -2532,11 +2532,17 @@ switch_scr(scr_stat *scp, u_int next_scr) return EINVAL; } } + /* delay switch if actively updating screen */ if (write_in_progress || blink_in_progress) { delayed_next_scr = next_scr+1; return 0; } + + /* Stop the screensaver */ + if (scrn_blanked > 0) + stop_scrn_saver(current_saver); + switch_in_progress = TRUE; old_scp = cur_console; new_scp = console[next_scr];