gdb/darwin: remove not-so-harmless spurious call to `wait4`
[binutils-gdb.git] / gdb / ser-mingw.c
index 2dcc03792368f8fb576e8fa076326789d5e3a975..afe04102e1554ec734b7fe18c73a7b231ce224d9 100644 (file)
@@ -1,6 +1,6 @@
 /* Serial interface for local (hardwired) serial ports on Windows systems
 
-   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Copyright (C) 2006-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 #include <sys/types.h>
 
 #include "command.h"
+#include "gdbsupport/buildargv.h"
 
 struct ser_windows_state
 {
@@ -599,6 +600,11 @@ console_select_thread (void *arg)
                  break;
                }
            }
+         else if (record.EventType == MOUSE_EVENT)
+           {
+             SetEvent (state->read_event);
+             break;
+           }
 
          /* Otherwise discard it and wait again.  */
          ReadConsoleInput (h, &record, 1, &n_records);