Repository: crossterm-rs/crossterm (language: rust)

Issue:
Missing mouse clicks on Windows
**Describe the bug**
When clicking the mouse rapidly (double-click speed), every second click is ignored.

**To Reproduce**
Steps to reproduce the behavior:
1. Run `cargo run --example event-poll-read`
2. Click the mouse at the double-clicking speed, at least four times
3. See in the output that only half of the clicks (in this case two) are registered, with two "Up" events beside each other with no "Down" event in between. Like below:

```text
Event::Key(KeyEvent { code: Enter, modifiers: KeyModifiers(0x0), kind: Release, state: KeyEventState(0x0) })
.
.
Event::Mouse(MouseEvent { kind: Down(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
Event::Mouse(MouseEvent { kind: Up(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
Event::Mouse(MouseEvent { kind: Up(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
Event::Mouse(MouseEvent { kind: Down(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
Event::Mouse(MouseEvent { kind: Up(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
Event::Mouse(MouseEvent { kind: Up(Left), column: 74, row: 6, modifiers: KeyModifiers(0x0) })
.
Event::Key(KeyEvent { code: Esc, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) })
```

**Expected behavior**
Every mouse click is captured.

**OS**
 - Only on Windows (I am running Windows Home 11)
 - Linux and WSL (Ubuntu 22) behave properly

**Terminal/Console**
 - Windows Terminal and Command Prompt both exhibit this behaviour on my PC.



Discussion / hints:

Fix patch:
diff --git a/src/event/sys/windows/parse.rs b/src/event/sys/windows/parse.rs
index 74289e5a7..97677ecf6 100644
--- a/src/event/sys/windows/parse.rs
+++ b/src/event/sys/windows/parse.rs
@@ -314,7 +314,7 @@ fn parse_mouse_event_record(
     let button_state = event.button_state;
 
     let kind = match event.event_flags {
-        EventFlags::PressOrRelease => {
+        EventFlags::PressOrRelease | EventFlags::DoubleClick => {
             if button_state.left_button() && !buttons_pressed.left {
                 Some(MouseEventKind::Down(MouseButton::Left))
             } else if !button_state.left_button() && buttons_pressed.left {
@@ -357,7 +357,6 @@ fn parse_mouse_event_record(
                 None
             }
         }
-        EventFlags::DoubleClick => None, // double click not supported by unix terminals
         EventFlags::MouseHwheeled => {
             if button_state.scroll_left() {
                 Some(MouseEventKind::ScrollLeft)


Test patch: