public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: L A Walsh <cygwin@tlinx.org>
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: X11 blinking cursor in text window like 'gvim' - only halts if moved-over another X11-win
Date: Sun, 11 Apr 2021 07:53:37 -0700	[thread overview]
Message-ID: <60730D71.2090806@tlinx.org> (raw)
In-Reply-To: <0d803d41-42b6-4725-b1c8-3e01486907fb@dronecode.org.uk>



On 2021/04/11 07:33, Jon Turney wrote:
> On 10/04/2021 22:37, L A Walsh wrote:
>> On 2021/04/10 12:14, L A Walsh wrote:
>>> On 2021/04/09 07:41, Jon Turney wrote:
>>>> I think so, yes.
>>> ===
>>>
>>>     That's unfortunate.  Well, I wasn't sure if it was new
>>> or old. At least its not some new problem.  Sigh.
>>>
>>>     Thanks for the backstory.
>>>> [1] https://sourceware.org/legacy-ml/cygwin/2017-04/msg00168.html
>>>> [2] https://sourceware.org/legacy-ml/cygwin/2017-04/msg00278.html
>>>> [3] https://sourceware.org/pipermail/cygwin/2017-May/232564.html
>> ---
>>    I don't know if this was tried, but the only way to really do
>> it would be along the lines of detecting when windows had grabbed
>> control via its time -- for cygwin to use a timer to detect when it
>> lost control.  Ex. in cygwin's blink routine, it would need to check
> 
> There is no 'cygwin blink routine' - this is something that the X client 
> (e.g. gvim in your example) is doing, while it believe that it has focus.
---
	Use of "cygwin blink routine" refers to whatever timing mechanism
calls some graphical routine to toggle on and off a cursor, unless you are
saying that the timer routine responsible for blinking is only present in
gvim, in which case X or cygwin might need their own timer routine.


> 
>> that it still had focus, and if it had lost it for longer than 50-75ms
>> (maybe configurable), assume cursor is over a Win-Window...  May not
>> be worth the bother, but it might catch the problem?
> 
> There's almost certainly no need for such heuristics.  Windows provides 
> various notification messages when the focus is moving, it's translating 
> those (correctly) into the model that X clients expect that is the problem.
----
	I suggest a heuristic because a direct translation has been resistant 
to implementation, so far, but also because windows is using a heuristic to
determine when to change focus.  It uses a timer to give you time to move
to a widget and not activate everything between the two -- like when I
right click on a task on the menu bar and the options appear about .5-1"
to the right of the menu bar (mine is on the left, not bottom).  That means
I need to move over some other "stuff" before I can get to the target.  If
I move too slowly, the target disappears.  If windows waits too long to activate
the target, I find myself moving into a window and waiting for it to become
active.

	So the time before windows activates the target is also a configurable
wait time, which is why I thought cygwin might use something similar.  It may
not be ideal, and not always, do I move to my target quickly enough, but 
it works most of the time in practical use.


      reply	other threads:[~2021-04-11 14:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07  0:27 L A Walsh
2021-04-07 18:46 ` Achim Gratz
2021-04-08  8:52   ` L A Walsh
2021-04-08  9:52   ` Lemke, Michael  SF/HZA-ZIC2
2021-04-08 11:19   ` Andrey Repin
2021-04-15 19:10     ` Achim Gratz
2021-06-16 17:41     ` L A Walsh
2021-04-09 14:41 ` Jon Turney
2021-04-09 15:12   ` Thomas Wolff
2021-04-10 21:40     ` L A Walsh
2021-04-11 14:14     ` Jon Turney
2021-04-10 19:14   ` L A Walsh
2021-04-10 21:37     ` L A Walsh
2021-04-11 14:33       ` Jon Turney
2021-04-11 14:53         ` L A Walsh [this message]

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=60730D71.2090806@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).