delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/25/21:38:45

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Tue, 25 Jul 2000 21:37:50 -0400
To: cygwin AT sourceware DOT cygnus DOT com
Cc: DJ Delorie <dj AT cygnus DOT com>
Subject: Re: Couple of nits about Cygwin
Message-ID: <20000725213749.A17042@cygnus.com>
Reply-To: cygwin AT sources DOT redhat DOT com
Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com, DJ Delorie <dj AT cygnus DOT com>
References: <200007251049870 DOT SM00160 AT KENDALLB> <200007260019 DOT UAA14196 AT envy DOT delorie DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <200007260019.UAA14196@envy.delorie.com>; from dj@delorie.com on Tue, Jul 25, 2000 at 08:19:22PM -0400

On Tue, Jul 25, 2000 at 08:19:22PM -0400, DJ Delorie wrote:
>
>>  1. When you start a bash shell, the cursor flashes at a reasonable 
>> rate, but when you start typing it generally disappears from view. 
>
>Found it.  WriteFile() to the console causes the cursor to dissapear
>for a bit.  Setting the cursor position makes it show up again.  Try
>the attached patch (I'll try it myself later, but the machine is in
>the middle of a big build I don't want to interrupt).

That seems to do it.  Thanks!  This problem has plagued Cygwin for
years.

I think it makes more sense for this to be in fhandler_console::read,
though.  Otherwise you're forcing the cursor to track every write, which
probably defeats the purpose of making it invisible for a while.

Putting it in the console read part means that the cursor is made
visible when cygwin is ready to receive input.

The change below just moves your code to the input part of cygwin rather
than the output.  It seems to work as well as putting it in the write
part.

Thanks again.  This problem was particularly noticeable on Windows 2K.
I've been meaning to investigate it for a while.

cgf

Index: fhandler_console.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_console.cc,v
retrieving revision 1.11
diff -u -p -r1.11 fhandler_console.cc
--- fhandler_console.cc	2000/07/10 23:08:45	1.11
+++ fhandler_console.cc	2000/07/26 01:35:49
@@ -145,6 +145,7 @@ fhandler_console::read (void *pv, size_t
       if ((bgres = bg_check (SIGTTIN)) <= 0)
 	return bgres;
 
+      cursor_rel (0,0); /* to make cursor appear on the screen immediately */
       switch (WaitForMultipleObjects (nwait, w4, FALSE, INFINITE))
 	{
 	case WAIT_OBJECT_0:

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019