Index: uspace/srv/hid/display/types/display/window.h
===================================================================
--- uspace/srv/hid/display/types/display/window.h	(revision 34342334f4ef070d93f0cc4c5270e49e76ef9e7e)
+++ uspace/srv/hid/display/types/display/window.h	(revision 65160d7b5c9319574b34becfbfbd0921c9a0b187)
@@ -80,4 +80,6 @@
 	/** Display bitmap */
 	gfx_bitmap_t *bitmap;
+	/** Bounding rectangle */
+	gfx_rect_t rect;
 } ds_window_bitmap_t;
 
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision 34342334f4ef070d93f0cc4c5270e49e76ef9e7e)
+++ uspace/srv/hid/display/window.c	(revision 65160d7b5c9319574b34becfbfbd0921c9a0b187)
@@ -92,8 +92,10 @@
 {
 	ds_window_t *wnd = (ds_window_t *) arg;
+	gfx_rect_t crect;
 	gfx_rect_t drect;
 
 	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect");
-	gfx_rect_translate(&wnd->dpos, rect, &drect);
+	gfx_rect_clip(rect, &wnd->rect, &crect);
+	gfx_rect_translate(&wnd->dpos, &crect, &drect);
 	return gfx_fill_rect(ds_display_get_gc(wnd->display), &drect);
 }
@@ -124,4 +126,5 @@
 
 	cbm->wnd = wnd;
+	cbm->rect = params->rect;
 	*rbm = (void *)cbm;
 	return EOK;
@@ -158,9 +161,32 @@
 	ds_window_bitmap_t *cbm = (ds_window_bitmap_t *)bm;
 	gfx_coord2_t doffs;
-
-	if (offs0 != NULL)
-		gfx_coord2_add(&cbm->wnd->dpos, offs0, &doffs);
-	else
-		doffs = cbm->wnd->dpos;
+	gfx_coord2_t offs;
+	gfx_rect_t srect;
+	gfx_rect_t swrect;
+	gfx_rect_t crect;
+
+	if (srect0 != NULL) {
+		/* Clip source rectangle to bitmap rectangle */
+		gfx_rect_clip(srect0, &cbm->rect, &srect);
+	} else {
+		/* Source is entire bitmap rectangle */
+		srect = cbm->rect;
+	}
+
+	if (offs0 != NULL) {
+		offs = *offs0;
+	} else {
+		offs.x = 0;
+		offs.y = 0;
+	}
+
+	/* Transform window rectangle back to bitmap coordinate system */
+	gfx_rect_rtranslate(&offs, &cbm->wnd->rect, &swrect);
+
+	/* Clip so that transformed rectangle will be inside the window */
+	gfx_rect_clip(&srect, &swrect, &crect);
+
+	/* Offset for rendering on screen = window pos + offs */
+	gfx_coord2_add(&cbm->wnd->dpos, &offs, &doffs);
 
 	return gfx_bitmap_render(cbm->bitmap, srect0, &doffs);
