linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: torvalds@transmeta.com
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] inivisible cursor on vesafb
Date: Mon, 19 Aug 2002 01:05:41 +0200	[thread overview]
Message-ID: <20020818230541.GA1680@ppc.vc.cvut.cz> (raw)

Hi Linus,

Since vesafb was converted to the (strange) cfb* interface, it uses random
colors for the cursor, making cursor invisible when console uses black foreground
(f.e. Midnight Commander does that). Problem is common to all fbdevs which
use fbcon-accel interface.

This change tries to restore old behavior which existed before cfb* came in.
Unfortunately due to region.color semantic it is not possible to completely
restore previous behavior - 
+ for truecolor cfbfillrect always consults current palette, so we do not 
  have "always invert" constant available, and so we do inversion with palette
  color 15 (it is light white, ~0, by default)
+ for directcolor it assumes that display has at least 4 bits per color.
+ for pseudocolor it works as old code worked.

						Thanks,
							Petr Vandrovec
							vandrove@vc.cvut.cz


diff -urdN linux/drivers/video/fbcon-accel.c linux/drivers/video/fbcon-accel.c
--- linux/drivers/video/fbcon-accel.c	2002-08-18 01:35:06.000000000 +0200
+++ linux/drivers/video/fbcon-accel.c	2002-08-18 15:07:42.000000000 +0200
@@ -104,7 +104,10 @@
 	struct fb_info *info = p->fb_info;
 	struct fb_fillrect region;
 
-	region.color = attr_fgcol_ec(p, p->conp);
+	if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR || info->fix.visual == FB_VISUAL_TRUECOLOR)
+		region.color = 0x0F;
+	else
+		region.color = (0x0F << info->var.red.offset) | (0x0F << info->var.green.offset) | (0x0F << info->var.blue.offset);
 	region.dx = xx * fontwidth(p);
 	region.dy = yy * fontheight(p);
 	region.width  = fontwidth(p);


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

             reply	other threads:[~2002-08-18 23:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-18 23:05 Petr Vandrovec [this message]
2002-08-19  1:10 ` [PATCH] inivisible cursor on vesafb Antonino Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020818230541.GA1680@ppc.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).