diff -ru a/Include/py_curses.h b/Include/py_curses.h
--- a/Include/py_curses.h	2018-04-15 00:06:30.000000000 +0200
+++ b/Include/py_curses.h	2018-04-19 14:50:07.967630196 +0200
@@ -12,6 +12,13 @@
 #endif
 #endif /* __APPLE__ */
 
+#ifdef __CYGWIN__
+/* the following define is necessary for Cygwin; without it, the
+   Cygwin-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python
+   can't get at the WINDOW flags field. */
+#define NCURSES_INTERNALS
+#endif /* __CYGWIN__ */
+
 #ifdef __FreeBSD__
 /*
 ** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
