+ // We used to use a reference on the "window" parameter, but we cannot do
+ // that with an opaque pointer (see NCURSES_OPAQUE). If the parameter was
+ // "::stdscr", that is first set via the "constructing() call, and is null
+ // up to that point. So we allow a null pointer here as meaning the "same"
+ // as "::stdscr".
+ w = window ? window : ::stdscr;