[PATCH][fbcon] Don't repaint the cursor when it is disabled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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=/dev/urandom of=/dev/fb0`.

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

Signed-off-by: Michal Januszewski <[email protected]>
---

diff -Nupr linux-2.6.12-orig/drivers/video/console/fbcon.c linux-2.6.12/drivers/video/console/fbcon.c
--- linux-2.6.12-orig/drivers/video/console/fbcon.c	2005-06-17 21:48:29.000000000 +0200
+++ linux-2.6.12/drivers/video/console/fbcon.c	2005-07-17 13:32:00.000000000 +0200
@@ -276,7 +276,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];

Attachment: pgptFXFQjIthP.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux