Index: uspace/srv/hid/compositor/compositor.c
===================================================================
--- uspace/srv/hid/compositor/compositor.c	(revision 790f3a3a7e4d0de0dc62be56505cd98a8966eaef)
+++ uspace/srv/hid/compositor/compositor.c	(revision ee23f85afac1693b423bd5ce08823705e347d2a7)
@@ -224,4 +224,5 @@
 
 	link_initialize(&win->link);
+	/* One initial reference will be for being in the window list */
 	refcount_init(&win->ref_cnt);
 	prodcons_initialize(&win->queue);
@@ -241,5 +242,8 @@
 static void window_destroy(window_t *win)
 {
-	if (!win || !refcount_down(&win->ref_cnt))
+	if (win == NULL)
+		return;
+
+	if (!refcount_down(&win->ref_cnt))
 		return;
 
@@ -891,4 +895,7 @@
 		    0, 0, width, height, win->transform, &x, &y, &width, &height);
 	}
+
+	/* Down refcount for removing from the window list */
+	window_destroy(win);
 
 	comp_damage(x, y, width, height);
