linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] nonblinking VGA block cursor
@ 2001-06-15 14:22 Leon Breedt
  2001-06-15 19:21 ` Albert D. Cahalan
  2001-06-17 16:34 ` Pavel Machek
  0 siblings, 2 replies; 13+ messages in thread
From: Leon Breedt @ 2001-06-15 14:22 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

Hi,

Attached is a patch to enforce a non-blinking, FreeBSD-syscons like
block cursor in console mode.

This is useful for laptop types, or people like me who really really
detest a blinking cursor.

NOTE: It disables the softcursor escape codes 
      (/usr/src/linux/Documentation/VGA-softcursor.txt), since I don't 
      ever want anything to change my cursor shape/style :)

It applies cleanly against 2.4.5, to use, select: 

'VGA block cursor (non-blinking) support' in the 'Console drivers'
section of menuconfig.

Have fun,

Leon.

-- 
lj breedt
coder

[-- Attachment #2: noblink-2.4.5.diff --]
[-- Type: text/plain, Size: 2037 bytes --]

diff -uNr linux-2.4.5/arch/i386/config.in linux-2.4.5.nonblink/arch/i386/config.in
--- linux-2.4.5/arch/i386/config.in	Fri May 25 00:14:08 2001
+++ linux-2.4.5.nonblink/arch/i386/config.in	Fri Jun 15 16:03:32 2001
@@ -356,6 +356,9 @@
    mainmenu_option next_comment
    comment 'Console drivers'
    bool 'VGA text console' CONFIG_VGA_CONSOLE
+   if [ "$CONFIG_VGA_CONSOLE" = "y" ]; then
+      bool 'VGA block cursor (non-blinking) support' CONFIG_NON_BLINK_CURSOR
+   fi
    bool 'Video mode selection support' CONFIG_VIDEO_SELECT
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
diff -uNr linux-2.4.5/drivers/char/console.c linux-2.4.5.nonblink/drivers/char/console.c
--- linux-2.4.5/drivers/char/console.c	Fri Feb  9 21:30:22 2001
+++ linux-2.4.5.nonblink/drivers/char/console.c	Fri Jun 15 15:47:58 2001
@@ -124,6 +124,11 @@
 #define DEFAULT_BELL_PITCH	750
 #define DEFAULT_BELL_DURATION	(HZ/8)
 
+/* 
+ * cursor_type value for non-blinking white block cursor
+ */
+#define CUR_NONBLINK 16748305
+
 extern void vcs_make_devfs (unsigned int index, int unregister);
 
 #ifndef MIN
@@ -1403,7 +1408,12 @@
 	kbd_table[currcons].ledflagstate = kbd_table[currcons].default_ledflagstate;
 	set_leds();
 
+#ifdef CONFIG_NON_BLINK_CURSOR
+	cursor_type = CUR_NONBLINK;
+#else
 	cursor_type = CUR_DEFAULT;
+#endif
+
 	complement_mask = s_complement_mask;
 
 	default_attr(currcons);
@@ -1595,6 +1605,7 @@
 			set_mode(currcons,0);
 			return;
 		case 'c':
+#ifndef CONFIG_NON_BLINK_CURSOR
 			if (ques) {
 				if (par[0])
 					cursor_type = par[0] | (par[1]<<8) | (par[2]<<16);
@@ -1602,6 +1613,7 @@
 					cursor_type = CUR_DEFAULT;
 				return;
 			}
+#endif
 			break;
 		case 'm':
 			if (ques) {
@@ -2445,6 +2457,9 @@
 	save_screen(currcons);
 	gotoxy(currcons,x,y);
 	csi_J(currcons, 0);
+#ifdef CONFIG_NON_BLINK_CURSOR
+	cursor_type = CUR_NONBLINK;
+#endif
 	update_screen(fg_console);
 	printk("Console: %s %s %dx%d",
 		can_do_color ? "colour" : "mono",

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [patch] nonblinking VGA block cursor
@ 2001-06-15 21:43 Petr Vandrovec
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vandrovec @ 2001-06-15 21:43 UTC (permalink / raw)
  To: Daniel Phillips; +Cc: linux-kernel

On 15 Jun 01 at 21:34, Daniel Phillips wrote:
> On Friday 15 June 2001 21:21, Albert D. Cahalan wrote:
> > Non-blinking cursors are just wrong. You need to patch your brain.
> > You really fucked up, because now apps can't restore your cursor
> > to proper behavior as defined by IBM.
> 
> Just one question Albert: why doesn't my mouse cursor blink? ;-)

Because of you can move mouse cursor - moving mouse usually does not
have serious side effect. Normal cursor cannot be moved without
sideeffects, so you cannot find it so easy.

If you want, just plug matrox into your laptop and use matroxfb. It
restarts cursor blinking cycle on each character printed to screen,
so while you are typing, you still see cursor, but if you stop typing,
cursor starts blinking...

Just my 0.02Kc.
                                        Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz

[matroxfb has also noblink option because HPA wanted it. But it is
another story]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2001-06-17 16:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15 14:22 [patch] nonblinking VGA block cursor Leon Breedt
2001-06-15 19:21 ` Albert D. Cahalan
2001-06-15 19:34   ` Daniel Phillips
2001-06-15 19:38     ` Albert D. Cahalan
2001-06-15 23:44       ` Daniel Phillips
2001-06-16  0:03         ` Josh Myer
2001-06-16  0:14           ` Daniel Phillips
2001-06-16  7:22         ` Erik Mouw
2001-06-15 20:22   ` Leon Breedt
2001-06-16  3:52   ` Mike Galbraith
2001-06-16  4:17     ` John R Lenton
2001-06-17 16:34 ` Pavel Machek
2001-06-15 21:43 Petr Vandrovec

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).