Skip to contentSkip to conversation

fbcon: don't draw cursor when it's disabled

PATCH New Michal Januszewski 1 participant 1 message Apr 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbcon: don't draw cursor when it's disabled

From: Michal Januszewski <[email protected]>

When the cursor and echo are disabled on the current console, pressing a key will cause a black rectangle to be painted in the cursor's position. Fix this by not touching the framebuffer in fbcon_cursor() when the cursor is off.

---

 drivers/video/console/fbcon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/console/fbcon.c +1 -1
index f721341..7089aa8 100644
@@ -1330,7 +1330,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
 	int y;
  	int c = scr_readw((u16 *) vc->vc_pos);
 
-	if (fbcon_is_inactive(vc, info))
+	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
 		return;
 
 	ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;