Skip to content

Commit

Permalink
[PATCH] fbcon: don't repaint the cursor when it is disabled.
Browse files Browse the repository at this point in the history
Currently even when the cursor is disabled (`setterm -cursor off`), it is
still repainted as a black rectangle the size of a single char.  This can
be seen, for example, by chvt'ing to a free tty, disabling the cursor and
doing `dd if=3D/dev/urandom of=3D/dev/fb0`.

The patch changes this behaviour by avoiding painting anything when the
cursor is disabled.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Cc: <linux-fbdev-devel@lists.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Michal Januszewski authored and Linus Torvalds committed Jul 27, 2005
1 parent d210224 commit dbd4f12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ static void fb_flashcursor(void *private)

if (!vc || !CON_IS_VISIBLE(vc) ||
fbcon_is_inactive(vc, info) ||
registered_fb[con2fb_map[vc->vc_num]] != info)
registered_fb[con2fb_map[vc->vc_num]] != info ||
vc_cons[ops->currcon].d->vc_deccm != 1)
return;
acquire_console_sem();
p = &fb_display[vc->vc_num];
Expand Down

0 comments on commit dbd4f12

Please sign in to comment.