X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fwindow.c;h=7dd14c7b3d53d6e22e7538d2eadea855469c0e92;hb=b2786d791c97b51fee5f5c628d2819fc58c03d8e;hp=53f264dc91200ebdfcce700dfdc7db822d2d3b2b;hpb=d0d1517f5447d0bd95c6b9769a92054f4c7fcaae;p=rodin%2Fchimara.git
diff --git a/libchimara/window.c b/libchimara/window.c
index 53f264d..7dd14c7 100644
--- a/libchimara/window.c
+++ b/libchimara/window.c
@@ -895,17 +895,26 @@ glk_window_clear(winid_t win)
/**
* glk_set_window:
- * @win: A window.
+ * @win: A window, or %NULL.
*
* Sets the current stream to @win's window stream. It is exactly equivalent to
* |[ #glk_stream_set_current(#glk_window_get_stream(@win)) ]|
* See Streams.
+ *
+ * Chimara
+ *
+ * Although this is not mentioned in the specification, @win may also be
+ * %NULL, in which case the current stream is also set to %NULL.
+ *
*/
void
glk_set_window(winid_t win)
{
- VALID_WINDOW(win, return);
- glk_stream_set_current( glk_window_get_stream(win) );
+ VALID_WINDOW_OR_NULL(win, return);
+ if(win)
+ glk_stream_set_current( glk_window_get_stream(win) );
+ else
+ glk_stream_set_current(NULL);
}
/**