Index: uspace/app/gfxdemo/gfxdemo.c
===================================================================
--- uspace/app/gfxdemo/gfxdemo.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/app/gfxdemo/gfxdemo.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -232,4 +232,5 @@
 		return rc;
 
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 0;
 	params.rect.p0.y = 0;
Index: uspace/app/terminal/terminal.c
===================================================================
--- uspace/app/terminal/terminal.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/app/terminal/terminal.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -775,4 +775,5 @@
 	}
 
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 0;
 	params.rect.p0.y = 0;
Index: uspace/lib/display/src/display.c
===================================================================
--- uspace/lib/display/src/display.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/display/src/display.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -137,4 +137,7 @@
 /** Initialize window parameters structure.
  *
+ * Window parameters structure must always be initialized using this function
+ * first.
+ *
  * @param params Window parameters structure
  */
Index: uspace/lib/gfx/include/gfx/bitmap.h
===================================================================
--- uspace/lib/gfx/include/gfx/bitmap.h	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/gfx/include/gfx/bitmap.h	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -42,4 +42,5 @@
 #include <types/gfx/bitmap.h>
 
+extern void gfx_bitmap_params_init(gfx_bitmap_params_t *);
 extern errno_t gfx_bitmap_create(gfx_context_t *, gfx_bitmap_params_t *,
     gfx_bitmap_alloc_t *, gfx_bitmap_t **);
Index: uspace/lib/gfx/src/bitmap.c
===================================================================
--- uspace/lib/gfx/src/bitmap.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/gfx/src/bitmap.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -35,8 +35,21 @@
 
 #include <gfx/bitmap.h>
+#include <mem.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include "../private/bitmap.h"
 #include "../private/context.h"
+
+/** Initialize bitmap parameters structure.
+ *
+ * Bitmap parameters structure must always be initialized using this function
+ * first.
+ *
+ * @param params Bitmap parameters structure
+ */
+void gfx_bitmap_params_init(gfx_bitmap_params_t *params)
+{
+	memset(params, 0, sizeof(gfx_bitmap_params_t));
+}
 
 /** Allocate bitmap in a graphics context.
Index: uspace/lib/gfx/test/bitmap.c
===================================================================
--- uspace/lib/gfx/test/bitmap.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/gfx/test/bitmap.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -84,4 +84,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -120,4 +121,6 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
+	gfx_bitmap_params_init(&params);
+
 	rc = gfx_bitmap_create(gc, &params, NULL, &bitmap);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -159,4 +162,6 @@
 	rc = gfx_context_new(&ops, &tgc, &gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_bitmap_params_init(&params);
 
 	rc = gfx_bitmap_create(gc, &params, NULL, &bitmap);
Index: uspace/lib/gfx/test/coord.c
===================================================================
--- uspace/lib/gfx/test/coord.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/gfx/test/coord.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -598,5 +598,5 @@
 
 /** Rectangle dimensions for reversed rectangle are computed correctly */
-PCUT_TEST(rect_dims_straight)
+PCUT_TEST(rect_dims_reversed)
 {
 	gfx_rect_t rect;
Index: uspace/lib/gui/window.c
===================================================================
--- uspace/lib/gui/window.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/gui/window.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -405,4 +405,5 @@
 		return;
 
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 0;
 	params.rect.p0.y = 0;
Index: uspace/lib/ipcgfx/test/ipcgfx.c
===================================================================
--- uspace/lib/ipcgfx/test/ipcgfx.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/lib/ipcgfx/test/ipcgfx.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -330,4 +330,6 @@
 	resp.rc = ENOMEM;
 	resp.bitmap_create_called = false;
+
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -387,4 +389,6 @@
 	resp.rc = EOK;
 	resp.bitmap_create_called = false;
+
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -448,4 +452,5 @@
 
 	resp.rc = EOK;
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -502,4 +507,5 @@
 
 	resp.rc = EOK;
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -569,4 +575,5 @@
 
 	resp.rc = EOK;
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
@@ -635,4 +642,5 @@
 
 	resp.rc = EOK;
+	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 1;
 	params.rect.p0.y = 2;
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision 0e6e77f09b348a14b2b1fa8165b25000755a93f1)
+++ uspace/srv/hid/display/window.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -282,4 +282,5 @@
 	ds_display_add_window(client->display, wnd);
 
+	gfx_bitmap_params_init(&bparams);
 	bparams.rect = params->rect;
 
@@ -355,4 +356,5 @@
 	dgc = ds_display_get_gc(wnd->display); // XXX
 	if (dgc != NULL) {
+		gfx_bitmap_params_init(&bparams);
 		bparams.rect = *nrect;
 
