]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: console: Fix typeahead key swapping which still occurs.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 18 Mar 2022 12:35:07 +0000 (21:35 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 18 Mar 2022 13:47:01 +0000 (22:47 +0900)
commitfcb182387a23d59ad85896e9a92bab9bca37adec
tree2634e7acf2e011aecebec89b8fd5dd4f0eacf048
parentd88cbd0e7c48c631106871a87ff0f4f39b5743b7
Cygwin: console: Fix typeahead key swapping which still occurs.

- The commit "Cygwin: console: Improve the code to avoid typeahead
  key swapping." did not solve the problem enough. 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() may report the event sequence 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. Current code gives
      up to fix in this situation.
  This patch should fix that issue.
winsup/cygwin/fhandler_console.cc
This page took 0.031048 seconds and 5 git commands to generate.