Index: uspace/lib/display/test/display.c
===================================================================
--- uspace/lib/display/test/display.c	(revision 06808543ddcf3db81aa4fd6bcb19218aa143260a)
+++ uspace/lib/display/test/display.c	(revision 5480d5ef8109a81271ad3461add3babd6bddae04)
@@ -62,4 +62,5 @@
 static errno_t test_window_resize(void *, sysarg_t, gfx_coord2_t *,
     gfx_rect_t *);
+static errno_t test_window_set_cursor(void *, sysarg_t, display_stock_cursor_t);
 static errno_t test_get_event(void *, sysarg_t *, display_wnd_ev_t *);
 static errno_t test_get_info(void *, display_info_t *);
@@ -74,4 +75,5 @@
 	.window_resize_req = test_window_resize_req,
 	.window_resize = test_window_resize,
+	.window_set_cursor = test_window_set_cursor,
 	.get_event = test_get_event,
 	.get_info = test_get_info
@@ -122,4 +124,8 @@
 	gfx_rect_t resize_nbound;
 	sysarg_t resize_wnd_id;
+
+	bool window_set_cursor_called;
+	sysarg_t set_cursor_wnd_id;
+	display_stock_cursor_t set_cursor_cursor;
 
 	bool get_event_called;
@@ -777,4 +783,104 @@
 	PCUT_ASSERT_INT_EQUALS(nrect.p1.x, resp.resize_nbound.p1.x);
 	PCUT_ASSERT_INT_EQUALS(nrect.p1.y, resp.resize_nbound.p1.y);
+
+	display_window_destroy(wnd);
+	display_close(disp);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** display_window_set_cursor() with server returning error response works. */
+PCUT_TEST(window_set_cursor_failure)
+{
+	errno_t rc;
+	service_id_t sid;
+	display_t *disp = NULL;
+	display_wnd_params_t params;
+	display_window_t *wnd;
+	test_response_t resp;
+
+	async_set_fallback_port_handler(test_display_conn, &resp);
+
+	// FIXME This causes this test to be non-reentrant!
+	rc = loc_server_register(test_display_server);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = loc_service_register(test_display_svc, &sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = display_open(test_display_svc, &disp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(disp);
+
+	resp.rc = EOK;
+	display_wnd_params_init(&params);
+	params.rect.p0.x = 0;
+	params.rect.p0.y = 0;
+	params.rect.p0.x = 100;
+	params.rect.p0.y = 100;
+
+	rc = display_window_create(disp, &params, &test_display_wnd_cb,
+	    (void *) &resp, &wnd);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(wnd);
+
+	resp.rc = EIO;
+	resp.window_set_cursor_called = false;
+
+	rc = display_window_set_cursor(wnd, dcurs_size_ud);
+	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.set_cursor_wnd_id);
+	PCUT_ASSERT_TRUE(resp.window_set_cursor_called);
+	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
+	PCUT_ASSERT_INT_EQUALS(dcurs_size_ud, resp.set_cursor_cursor);
+
+	display_window_destroy(wnd);
+	display_close(disp);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** display_window_set_cursor() with server returning success response works. */
+PCUT_TEST(window_set_cursor_success)
+{
+	errno_t rc;
+	service_id_t sid;
+	display_t *disp = NULL;
+	display_wnd_params_t params;
+	display_window_t *wnd;
+	test_response_t resp;
+
+	async_set_fallback_port_handler(test_display_conn, &resp);
+
+	// FIXME This causes this test to be non-reentrant!
+	rc = loc_server_register(test_display_server);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = loc_service_register(test_display_svc, &sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = display_open(test_display_svc, &disp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(disp);
+
+	resp.rc = EOK;
+	display_wnd_params_init(&params);
+	params.rect.p0.x = 0;
+	params.rect.p0.y = 0;
+	params.rect.p0.x = 100;
+	params.rect.p0.y = 100;
+
+	rc = display_window_create(disp, &params, &test_display_wnd_cb,
+	    (void *) &resp, &wnd);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(wnd);
+
+	resp.rc = EOK;
+	resp.window_set_cursor_called = false;
+
+	rc = display_window_set_cursor(wnd, dcurs_size_ud);
+	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.set_cursor_wnd_id);
+	PCUT_ASSERT_TRUE(resp.window_set_cursor_called);
+	PCUT_ASSERT_ERRNO_VAL(resp.rc, EOK);
+	PCUT_ASSERT_INT_EQUALS(dcurs_size_ud, resp.set_cursor_cursor);
 
 	display_window_destroy(wnd);
@@ -1500,4 +1606,16 @@
 }
 
+static errno_t test_window_set_cursor(void *arg, sysarg_t wnd_id,
+    display_stock_cursor_t cursor)
+{
+	test_response_t *resp = (test_response_t *) arg;
+
+	resp->window_set_cursor_called = true;
+	resp->set_cursor_wnd_id = wnd_id;
+	resp->set_cursor_cursor = cursor;
+
+	return resp->rc;
+}
+
 static errno_t test_get_event(void *arg, sysarg_t *wnd_id,
     display_wnd_ev_t *event)
