>On Wed, Feb 09, 2000 at 08:35:07PM +0200, Ruslan Ermilov wrote:
>> Hi!
>>
>> 1. Set cursor "blinking" or "destructive" (SC_BLINK_CURSOR)
>> 2. Press Scroll Lock (cursor will go away)
>> 3. Switch to another vtyX
>> 4. Switch to the original vty, where you pressed Scroll Lock
>> 5. Watch the cursor will appear at the same position as it was on vtyX.
>>
>The following patch fixes the problem.
Thank you for the report and patch.
While your patch seems to work, it looks to me it's slightly over-kill
for this problem; we shouldn't need to call sc_remove_cursor_image()
every time the screen is refreshed in scrn_upcate().
Because this problem is caused by exchange_scr() not removing the text
cursor when changing to the vty where the cursor is not currently
shown, we had better fix exchange_scr().
The attached patch is simpler and fixes the problem. I verified it
works here. Please test. Thank you.
Kazu
Index: syscons.c
===================================================================
RCS file: /src/CVS/src/sys/dev/syscons/syscons.c,v
retrieving revision 1.335
diff -u -r1.335 syscons.c
--- syscons.c 2000/01/29 15:08:49 1.335
+++ syscons.c 2000/02/10 01:52:28
@@ -2335,6 +2337,8 @@
/* 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);
>Index: scvgarndr.c
>===================================================================
>RCS file: /usr/FreeBSD-CVS/src/sys/dev/syscons/scvgarndr.c,v
>retrieving revision 1.5
>diff -u -p -r1.5 scvgarndr.c
>--- scvgarndr.c 2000/01/29 15:08:47 1.5
>+++ scvgarndr.c 2000/02/09 23:52:53
>@@ -225,10 +225,8 @@ vga_txtcursor(scr_stat *scp, int at, int
> at%scp->xsize,
> at/scp->xsize);
> } else {
>- if (scp->status & VR_CURSOR_ON)
>- (*vidsw[adp->va_index]->set_hw_cursor)(adp,
>- -1, -1);
> scp->status &= ~VR_CURSOR_ON;
>+ (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1);
> }
> } else {
> scp->status &= ~VR_CURSOR_BLINK;
>Index: syscons.c
>===================================================================
>RCS file: /usr/FreeBSD-CVS/src/sys/dev/syscons/syscons.c,v
>retrieving revision 1.335
>diff -u -p -r1.335 syscons.c
>--- syscons.c 2000/01/29 15:08:49 1.335
>+++ syscons.c 2000/02/09 23:52:53
>@@ -1806,7 +1806,8 @@ scrn_update(scr_stat *scp, int show_curs
> scp->cursor_pos));
> }
> }
>- }
>+ } else
>+ sc_remove_cursor_image(scp);
>
> #ifndef SC_NO_CUTPASTE
> /* update "pseudo" mouse pointer image */
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message