Index: uspace/lib/c/generic/io/console.c
===================================================================
--- uspace/lib/c/generic/io/console.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
+++ uspace/lib/c/generic/io/console.c	(revision d6c4d408b32d32fe8f22cbd847b0ba04ff2f7767)
@@ -323,4 +323,8 @@
 void console_unmap(console_ctrl_t *ctrl, charfield_t *buf)
 {
+	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
+	(void) async_req_0_0(exch, CONSOLE_UNMAP);
+	async_exchange_end(exch);
+
 	as_area_destroy(buf);
 }
Index: uspace/lib/congfx/src/console.c
===================================================================
--- uspace/lib/congfx/src/console.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
+++ uspace/lib/congfx/src/console.c	(revision d6c4d408b32d32fe8f22cbd847b0ba04ff2f7767)
@@ -137,5 +137,5 @@
 	sysarg_t rows;
 	sysarg_t cols;
-	charfield_t *buf;
+	charfield_t *buf = NULL;
 	errno_t rc;
 
@@ -149,4 +149,6 @@
 	if (rc != EOK)
 		goto error;
+
+	console_clear(con);
 
 	rc = console_map(con, cols, rows, &buf);
@@ -170,4 +172,6 @@
 	return EOK;
 error:
+	if (buf != NULL)
+		console_unmap(cgc->con, buf);
 	if (cgc != NULL)
 		free(cgc);
@@ -187,4 +191,7 @@
 	if (rc != EOK)
 		return rc;
+
+	console_clear(cgc->con);
+	console_unmap(cgc->con, cgc->buf);
 
 	free(cgc);
Index: uspace/lib/ui/private/window.h
===================================================================
--- uspace/lib/ui/private/window.h	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
+++ uspace/lib/ui/private/window.h	(revision d6c4d408b32d32fe8f22cbd847b0ba04ff2f7767)
@@ -39,4 +39,5 @@
 
 #include <errno.h>
+#include <congfx/console.h>
 #include <display.h>
 #include <gfx/context.h>
@@ -60,4 +61,6 @@
 	/** Display window */
 	display_window_t *dwindow;
+	/** Console GC */
+	console_gc_t *cgc;
 	/** Window GC */
 	gfx_context_t *gc;
Index: uspace/lib/ui/src/window.c
===================================================================
--- uspace/lib/ui/src/window.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
+++ uspace/lib/ui/src/window.c	(revision d6c4d408b32d32fe8f22cbd847b0ba04ff2f7767)
@@ -132,5 +132,5 @@
 	gfx_bitmap_t *bmp = NULL;
 	mem_gc_t *memgc = NULL;
-	console_gc_t *cgc;
+	console_gc_t *cgc = NULL;
 	errno_t rc;
 
@@ -256,4 +256,6 @@
 	window->gc = gc;
 #endif
+	window->cgc = cgc;
+
 	rc = ui_resource_create(window->gc, ui_is_textmode(ui), &res);
 	if (rc != EOK)
@@ -290,4 +292,6 @@
 	if (dgc != NULL)
 		dummygc_destroy(dgc);
+	if (cgc != NULL)
+		console_gc_delete(cgc);
 	if (dwindow != NULL)
 		display_window_destroy(dwindow);
@@ -321,4 +325,6 @@
 	if (window->dwindow != NULL)
 		display_window_destroy(window->dwindow);
+	if (window->cgc != NULL)
+		console_gc_delete(window->cgc);
 	free(window);
 }
