public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Orgad Shaneh <orgads@gmail.com>
To: Takashi Yano <takashi.yano@nifty.ne.jp>
Cc: cygwin@cygwin.com
Subject: Re: Typed characters are mis-ordered when CPU usage is high
Date: Fri, 18 Mar 2022 15:04:31 +0200	[thread overview]
Message-ID: <CAGHpTBKiEi_XC8oXhYcS=9hPW=9Gd2Ep=aTdLwbxsBp4zDmqqQ@mail.gmail.com> (raw)
In-Reply-To: <20220318211522.936158f91219816ca5c707e7@nifty.ne.jp>

On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
>
> On Fri, 18 Mar 2022 13:21:00 +0200
> Orgad Shaneh wrote:
> > > Git for Windows
> >
> > Were you able to reproduce?
> >
> > I found an easier way to reproduce, which works almost every time.
> >
> > It still happens only on Git Bash, and not on MSYS2 MINGW64, although
> > I use the same dll in both. I have no idea why there's a difference.
> > :/
> >
> > I run Windows Terminal, but it reproduces also in cmd, as you tried.
> >
> > 1. In Control Panel -> Keyboard, set Repeat delay to shortest and
> > Repeat rate to fastest.
> > 2. In msys2-runtime run git fetch
> > 3. Type git and press and hold q
>
> Thanks. I can reproduce the issue. I think I found the cause.
> The two unexpected things happen.
>
> (1) wVirtualKeyCode and wVirtualScanCode of readback key event may
>     be null'ed even if they are not zero on WriteConsoleInputW().
>     Therefore, memcmp() report the event is not equal.
> (2) WriteConsoleInputW() may not be atomic. The event sequence which
>     is written by WriteConsoleInputW() may be inserted by key input
>     in the middle of the sequence.
>
> A patch for these issues is attached. Could you please test?
>
> --
> Takashi Yano <takashi.yano@nifty.ne.jp>

Awesome, looks good now. Thank you very much!

Hope this is the last bit :)

- Orgad

  reply	other threads:[~2022-03-18 13:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-27 14:39 Orgad Shaneh
2022-02-27 14:53 ` Takashi Yano
2022-03-01 23:12   ` Takashi Yano
2022-03-02 20:13     ` Orgad Shaneh
2022-03-03  0:02       ` Takashi Yano
2022-03-03  3:46         ` Orgad Shaneh
2022-03-10 13:17         ` Orgad Shaneh
2022-03-11 21:36           ` Takashi Yano
2022-03-17 18:40             ` Orgad Shaneh
2022-03-18  4:23               ` Takashi Yano
2022-03-18  5:22                 ` Takashi Yano
2022-03-18  5:57                   ` Orgad Shaneh
2022-03-18  6:30                     ` Takashi Yano
2022-03-18  6:32                       ` Orgad Shaneh
2022-03-18 11:21                         ` Orgad Shaneh
2022-03-18 12:15                           ` Takashi Yano
2022-03-18 13:04                             ` Orgad Shaneh [this message]
2022-03-18 13:28                               ` Takashi Yano
2022-03-18  6:11               ` n952162
2022-03-02 20:28   ` Kaz Kylheku (Cygwin)
2022-03-03  0:29     ` Takashi Yano

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='CAGHpTBKiEi_XC8oXhYcS=9hPW=9Gd2Ep=aTdLwbxsBp4zDmqqQ@mail.gmail.com' \
    --to=orgads@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=takashi.yano@nifty.ne.jp \
    /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).