summaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorKazutaka YOKOTA <yokota@FreeBSD.org>2000-02-11 01:19:44 +0000
committerKazutaka YOKOTA <yokota@FreeBSD.org>2000-02-11 01:19:44 +0000
commitade23072299db35dbf1d91c37232ff0ce5d88d99 (patch)
tree33f72e76fbe0224434fa4be993ee8364e3a0bfa9 /sys/dev/syscons
parentdda7c8e323834454e0db2a6060d82643a976991e (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/scterm-sc.c4
-rw-r--r--sys/dev/syscons/syscons.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index f11cd27b8c28..6c5bfa84cf62 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -506,6 +506,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
break;
case 'C': /* set cursor type & shape */
+ i = spltty();
if (!ISGRAPHSC(sc->cur_scp))
sc_remove_cursor_image(sc->cur_scp);
if (tcp->num_param == 1) {
@@ -528,11 +529,10 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
* are affected. Update the cursor in the current console...
*/
if (!ISGRAPHSC(sc->cur_scp)) {
- i = spltty();
sc_set_cursor_image(sc->cur_scp);
sc_draw_cursor_image(sc->cur_scp);
- splx(i);
}
+ splx(i);
break;
case 'F': /* set ansi foreground */
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index b648cfbc1e87..af242b3d2bf1 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -718,6 +718,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
return 0;
case CONS_CURSORTYPE: /* set cursor type blink/noblink */
+ s = spltty();
if (!ISGRAPHSC(sc->cur_scp))
sc_remove_cursor_image(sc->cur_scp);
if ((*(int*)data) & 0x01)
@@ -733,11 +734,10 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
* are affected. Update the cursor in the current console...
*/
if (!ISGRAPHSC(sc->cur_scp)) {
- s = spltty();
sc_set_cursor_image(sc->cur_scp);
sc_draw_cursor_image(sc->cur_scp);
- splx(s);
}
+ splx(s);
return 0;
case CONS_BELLTYPE: /* set bell type sound/visual */
@@ -1791,7 +1791,6 @@ scrn_update(scr_stat *scp, int show_cursor)
scp->cursor_oldpos > scp->end) {
sc_remove_cursor_image(scp);
}
- scp->cursor_oldpos = scp->cursor_pos;
sc_draw_cursor_image(scp);
}
else {
@@ -2335,6 +2334,8 @@ exchange_scr(sc_softc_t *sc)
/* save the current state of video and keyboard */
sc_move_cursor(sc->old_scp, sc->old_scp->xpos, sc->old_scp->ypos);
+ if (!ISGRAPHSC(sc->old_scp))
+ sc_remove_cursor_image(sc->old_scp);
if (sc->old_scp->kbd_mode == K_XLATE)
save_kbd_state(sc->old_scp);
@@ -2386,6 +2387,7 @@ sc_draw_cursor_image(scr_stat *scp)
(*scp->rndr->draw_cursor)(scp, scp->cursor_pos,
scp->sc->flags & SC_BLINK_CURSOR, TRUE,
sc_inside_cutmark(scp, scp->cursor_pos));
+ scp->cursor_oldpos = scp->cursor_pos;
--scp->sc->videoio_in_progress;
}