From: Leon Breedt <ljb@devco.net>
To: linux-kernel@vger.kernel.org
Subject: [patch] nonblinking VGA block cursor
Date: Fri, 15 Jun 2001 16:22:49 +0200 [thread overview]
Message-ID: <20010615162249.A1328@rinoa.rinoa> (raw)
[-- 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",
next reply other threads:[~2001-06-15 14:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-15 14:22 Leon Breedt [this message]
2001-06-15 19:21 ` [patch] nonblinking VGA block cursor 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
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=20010615162249.A1328@rinoa.rinoa \
--to=ljb@devco.net \
--cc=linux-kernel@vger.kernel.org \
/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).