Index: uspace/lib/display/test/display.c
===================================================================
--- uspace/lib/display/test/display.c	(revision 4c6fd56b8079778d8d40e0d5ffc6a1e8e8ad2b5b)
+++ uspace/lib/display/test/display.c	(revision c9927c664d54127a7f3eb509f6129ebca2f158f1)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2023 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -38,5 +38,4 @@
 #include <loc.h>
 #include <pcut/pcut.h>
-#include <str.h>
 #include "../private/display.h"
 
@@ -51,24 +50,19 @@
 
 static void test_close_event(void *);
-static void test_focus_event(void *, unsigned);
+static void test_focus_event(void *);
 static void test_kbd_event(void *, kbd_event_t *);
 static void test_pos_event(void *, pos_event_t *);
-static void test_unfocus_event(void *, unsigned);
+static void test_unfocus_event(void *);
 
 static errno_t test_window_create(void *, display_wnd_params_t *, sysarg_t *);
 static errno_t test_window_destroy(void *, sysarg_t);
-static errno_t test_window_move_req(void *, sysarg_t, gfx_coord2_t *, sysarg_t);
+static errno_t test_window_move_req(void *, sysarg_t, gfx_coord2_t *);
 static errno_t test_window_move(void *, sysarg_t, gfx_coord2_t *);
 static errno_t test_window_get_pos(void *, sysarg_t, gfx_coord2_t *);
-static errno_t test_window_get_max_rect(void *, sysarg_t, gfx_rect_t *);
 static errno_t test_window_resize_req(void *, sysarg_t, display_wnd_rsztype_t,
-    gfx_coord2_t *, sysarg_t);
+    gfx_coord2_t *);
 static errno_t test_window_resize(void *, sysarg_t, gfx_coord2_t *,
     gfx_rect_t *);
-static errno_t test_window_minimize(void *, sysarg_t);
-static errno_t test_window_maximize(void *, sysarg_t);
-static errno_t test_window_unmaximize(void *, sysarg_t);
 static errno_t test_window_set_cursor(void *, sysarg_t, display_stock_cursor_t);
-static errno_t test_window_set_caption(void *, sysarg_t, const char *);
 static errno_t test_get_event(void *, sysarg_t *, display_wnd_ev_t *);
 static errno_t test_get_info(void *, display_info_t *);
@@ -82,12 +76,7 @@
 	.window_move = test_window_move,
 	.window_get_pos = test_window_get_pos,
-	.window_get_max_rect = test_window_get_max_rect,
 	.window_resize_req = test_window_resize_req,
 	.window_resize = test_window_resize,
-	.window_minimize = test_window_minimize,
-	.window_maximize = test_window_maximize,
-	.window_unmaximize = test_window_unmaximize,
 	.window_set_cursor = test_window_set_cursor,
-	.window_set_caption = test_window_set_caption,
 	.get_event = test_get_event,
 	.get_info = test_get_info
@@ -118,5 +107,4 @@
 	gfx_rect_t create_rect;
 	gfx_coord2_t create_min_size;
-	sysarg_t create_idev_id;
 	bool window_destroy_called;
 	sysarg_t destroy_wnd_id;
@@ -125,5 +113,4 @@
 	sysarg_t move_req_wnd_id;
 	gfx_coord2_t move_req_pos;
-	sysarg_t move_req_pos_id;
 
 	bool window_move_called;
@@ -134,8 +121,4 @@
 	sysarg_t get_pos_wnd_id;
 	gfx_coord2_t get_pos_rpos;
-
-	bool window_get_max_rect_called;
-	sysarg_t get_max_rect_wnd_id;
-	gfx_rect_t get_max_rect_rrect;
 
 	bool window_resize_req_called;
@@ -143,5 +126,4 @@
 	display_wnd_rsztype_t resize_req_rsztype;
 	gfx_coord2_t resize_req_pos;
-	sysarg_t resize_req_pos_id;
 
 	bool window_resize_called;
@@ -150,16 +132,8 @@
 	sysarg_t resize_wnd_id;
 
-	bool window_minimize_called;
-	bool window_maximize_called;
-	bool window_unmaximize_called;
-
 	bool window_set_cursor_called;
 	sysarg_t set_cursor_wnd_id;
 	display_stock_cursor_t set_cursor_cursor;
 
-	bool window_set_caption_called;
-	sysarg_t set_caption_wnd_id;
-	char *set_caption_caption;
-
 	bool get_event_called;
 
@@ -169,5 +143,4 @@
 	bool set_color_called;
 	bool close_event_called;
-
 	bool focus_event_called;
 	bool kbd_event_called;
@@ -186,23 +159,21 @@
 	display_t *disp = NULL;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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);
-
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+
+	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);
+
+	display_close(disp);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -216,13 +187,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -241,5 +211,4 @@
 	params.min_size.x = 11;
 	params.min_size.y = 12;
-	params.idev_id = 42;
 
 	rc = display_window_create(disp, &params, &test_display_wnd_cb,
@@ -252,12 +221,10 @@
 	PCUT_ASSERT_EQUALS(params.min_size.x, resp.create_min_size.x);
 	PCUT_ASSERT_EQUALS(params.min_size.y, resp.create_min_size.y);
-	PCUT_ASSERT_EQUALS(params.idev_id, resp.create_idev_id);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
 	PCUT_ASSERT_NULL(wnd);
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -274,13 +241,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -297,5 +263,4 @@
 	params.rect.p0.x = 100;
 	params.rect.p0.y = 100;
-	params.idev_id = 42;
 
 	rc = display_window_create(disp, &params, &test_display_wnd_cb,
@@ -306,5 +271,4 @@
 	PCUT_ASSERT_EQUALS(params.rect.p1.x, resp.create_rect.p1.x);
 	PCUT_ASSERT_EQUALS(params.rect.p1.y, resp.create_rect.p1.y);
-	PCUT_ASSERT_EQUALS(params.idev_id, resp.create_idev_id);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(wnd);
@@ -317,7 +281,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -331,13 +294,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -372,7 +334,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -393,14 +354,12 @@
 	test_response_t resp;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -426,7 +385,6 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-
-	rc = display_window_move_req(wnd, &pos, pos_id);
+
+	rc = display_window_move_req(wnd, &pos);
 	PCUT_ASSERT_TRUE(resp.window_move_req_called);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
@@ -434,11 +392,9 @@
 	PCUT_ASSERT_INT_EQUALS(pos.x, resp.move_req_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, resp.move_req_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, resp.move_req_pos_id);
 
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -453,14 +409,12 @@
 	test_response_t resp;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -486,7 +440,6 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-
-	rc = display_window_move_req(wnd, &pos, pos_id);
+
+	rc = display_window_move_req(wnd, &pos);
 	PCUT_ASSERT_TRUE(resp.window_move_req_called);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
@@ -494,11 +447,9 @@
 	PCUT_ASSERT_INT_EQUALS(pos.x, resp.move_req_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, resp.move_req_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, resp.move_req_pos_id);
 
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -513,13 +464,12 @@
 	gfx_coord2_t dpos;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -554,7 +504,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -569,13 +518,12 @@
 	gfx_coord2_t dpos;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -610,7 +558,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -625,13 +572,12 @@
 	gfx_coord2_t dpos;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -667,7 +613,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -682,13 +627,12 @@
 	gfx_coord2_t dpos;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -726,133 +670,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_get_max_rect() with server returning error response works. */
-PCUT_TEST(window_get_max_rect_failure)
-{
-	errno_t rc;
-	service_id_t sid;
-	display_t *disp = NULL;
-	display_wnd_params_t params;
-	display_window_t *wnd;
-	gfx_rect_t rect;
-	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_get_max_rect_called = false;
-
-	rect.p0.x = 0;
-	rect.p0.y = 0;
-	rect.p1.x = 0;
-	rect.p1.y = 0;
-
-	rc = display_window_get_max_rect(wnd, &rect);
-	PCUT_ASSERT_TRUE(resp.window_get_max_rect_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.get_max_rect_wnd_id);
-	PCUT_ASSERT_INT_EQUALS(0, rect.p0.x);
-	PCUT_ASSERT_INT_EQUALS(0, rect.p0.y);
-	PCUT_ASSERT_INT_EQUALS(0, rect.p1.x);
-	PCUT_ASSERT_INT_EQUALS(0, rect.p1.y);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_get_max_rect() with server returning success response works. */
-PCUT_TEST(window_get_max_rect_success)
-{
-	errno_t rc;
-	service_id_t sid;
-	display_t *disp = NULL;
-	display_wnd_params_t params;
-	display_window_t *wnd;
-	gfx_rect_t rect;
-	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_get_max_rect_called = false;
-	resp.get_max_rect_rrect.p0.x = 11;
-	resp.get_max_rect_rrect.p0.y = 12;
-	resp.get_max_rect_rrect.p1.x = 13;
-	resp.get_max_rect_rrect.p1.y = 14;
-
-	rect.p0.x = 0;
-	rect.p0.y = 0;
-	rect.p1.x = 0;
-	rect.p1.y = 0;
-
-	rc = display_window_get_max_rect(wnd, &rect);
-	PCUT_ASSERT_TRUE(resp.window_get_max_rect_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.get_max_rect_wnd_id);
-	PCUT_ASSERT_INT_EQUALS(resp.get_max_rect_rrect.p0.x, rect.p0.x);
-	PCUT_ASSERT_INT_EQUALS(resp.get_max_rect_rrect.p0.y, rect.p0.y);
-	PCUT_ASSERT_INT_EQUALS(resp.get_max_rect_rrect.p1.x, rect.p1.x);
-	PCUT_ASSERT_INT_EQUALS(resp.get_max_rect_rrect.p1.y, rect.p1.y);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -868,14 +685,12 @@
 	display_wnd_rsztype_t rsztype;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -902,7 +717,6 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-
-	rc = display_window_resize_req(wnd, rsztype, &pos, pos_id);
+
+	rc = display_window_resize_req(wnd, rsztype, &pos);
 	PCUT_ASSERT_TRUE(resp.window_resize_req_called);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
@@ -911,11 +725,9 @@
 	PCUT_ASSERT_INT_EQUALS(pos.x, resp.resize_req_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, resp.resize_req_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, resp.resize_req_pos_id);
 
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -931,14 +743,12 @@
 	display_wnd_rsztype_t rsztype;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -965,7 +775,6 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-
-	rc = display_window_resize_req(wnd, rsztype, &pos, pos_id);
+
+	rc = display_window_resize_req(wnd, rsztype, &pos);
 	PCUT_ASSERT_TRUE(resp.window_resize_req_called);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
@@ -974,11 +783,9 @@
 	PCUT_ASSERT_INT_EQUALS(pos.x, resp.resize_req_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, resp.resize_req_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, resp.resize_req_pos_id);
 
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -994,13 +801,12 @@
 	gfx_rect_t nrect;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1043,7 +849,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1059,13 +864,12 @@
 	gfx_rect_t nrect;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1107,207 +911,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_minimize() with server returning error response works. */
-PCUT_TEST(window_minimize_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;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_minimize_called = false;
-
-	rc = display_window_minimize(wnd);
-	PCUT_ASSERT_TRUE(resp.window_minimize_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_minimize() with server returning success response works. */
-PCUT_TEST(window_minimize_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;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_minimize_called = false;
-
-	rc = display_window_minimize(wnd);
-	PCUT_ASSERT_TRUE(resp.window_minimize_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_maximize() with server returning error response works. */
-PCUT_TEST(window_maximize_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;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_maximize_called = false;
-
-	rc = display_window_maximize(wnd);
-	PCUT_ASSERT_TRUE(resp.window_maximize_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_maximize() with server returning success response works. */
-PCUT_TEST(window_maximize_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;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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_maximize_called = false;
-
-	rc = display_window_maximize(wnd);
-	PCUT_ASSERT_TRUE(resp.window_maximize_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1321,13 +924,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1359,7 +961,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1373,13 +974,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1411,119 +1011,6 @@
 	display_window_destroy(wnd);
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_set_caption() with server returning error response works. */
-PCUT_TEST(window_set_caption_failure)
-{
-	errno_t rc;
-	service_id_t sid;
-	display_t *disp = NULL;
-	display_wnd_params_t params;
-	display_window_t *wnd;
-	const char *caption;
-	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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);
-
-	caption = "Hello";
-
-	resp.rc = EIO;
-	resp.window_set_caption_called = false;
-
-	rc = display_window_set_caption(wnd, caption);
-	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.set_caption_wnd_id);
-	PCUT_ASSERT_TRUE(resp.window_set_caption_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-	PCUT_ASSERT_INT_EQUALS(0, str_cmp(caption, resp.set_caption_caption));
-
-	//free(resp.set_caption_caption);
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
-}
-
-/** display_window_set_caption() with server returning success response works. */
-PCUT_TEST(window_set_caption_success)
-{
-	errno_t rc;
-	service_id_t sid;
-	display_t *disp = NULL;
-	display_wnd_params_t params;
-	display_window_t *wnd;
-	const char *caption;
-	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, 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);
-
-	caption = "Hello";
-
-	resp.rc = EOK;
-	resp.window_set_caption_called = false;
-
-	rc = display_window_set_caption(wnd, caption);
-	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.set_caption_wnd_id);
-	PCUT_ASSERT_TRUE(resp.window_set_caption_called);
-	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
-	PCUT_ASSERT_INT_EQUALS(0, str_cmp(caption, resp.set_caption_caption));
-
-	//free(resp.set_caption_caption);
-	display_window_destroy(wnd);
-	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1538,13 +1025,12 @@
 	test_response_t resp;
 	gfx_context_t *gc;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1577,7 +1063,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1593,13 +1078,12 @@
 	gfx_context_t *gc;
 	gfx_color_t *color;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1640,7 +1124,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1654,13 +1137,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1707,7 +1189,6 @@
 	display_close(disp);
 
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1721,13 +1202,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1752,5 +1232,4 @@
 	resp.event_cnt = 1;
 	resp.event.etype = wev_focus;
-	resp.event.ev.focus.nfocus = 42;
 	resp.wnd_id = wnd->id;
 	resp.focus_event_called = false;
@@ -1769,6 +1248,4 @@
 	PCUT_ASSERT_INT_EQUALS(resp.event.etype,
 	    resp.revent.etype);
-	PCUT_ASSERT_INT_EQUALS(resp.event.ev.focus.nfocus,
-	    resp.revent.ev.focus.nfocus);
 
 	rc = display_window_destroy(wnd);
@@ -1777,7 +1254,6 @@
 	display_close(disp);
 
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1791,13 +1267,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1856,7 +1331,6 @@
 	display_close(disp);
 
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1870,13 +1344,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1935,7 +1408,6 @@
 	display_close(disp);
 
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -1949,13 +1421,12 @@
 	display_window_t *wnd;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -1980,5 +1451,4 @@
 	resp.event_cnt = 1;
 	resp.event.etype = wev_unfocus;
-	resp.event.ev.unfocus.nfocus = 42;
 	resp.wnd_id = wnd->id;
 	resp.unfocus_event_called = false;
@@ -1997,6 +1467,4 @@
 	PCUT_ASSERT_INT_EQUALS(resp.event.etype,
 	    resp.revent.etype);
-	PCUT_ASSERT_INT_EQUALS(resp.event.ev.focus.nfocus,
-	    resp.revent.ev.focus.nfocus);
 
 	rc = display_window_destroy(wnd);
@@ -2005,7 +1473,6 @@
 	display_close(disp);
 
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -2018,13 +1485,12 @@
 	display_info_t info;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -2041,7 +1507,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -2054,13 +1519,12 @@
 	display_info_t info;
 	test_response_t resp;
-	loc_srv_t *srv;
-
-	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, &srv);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = loc_service_register(srv, test_display_svc, &sid);
+
+	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);
 
@@ -2085,7 +1549,6 @@
 
 	display_close(disp);
-	rc = loc_service_unregister(srv, sid);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	loc_server_unregister(srv);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 }
 
@@ -2149,10 +1612,9 @@
 }
 
-static void test_focus_event(void *arg, unsigned nfocus)
+static void test_focus_event(void *arg)
 {
 	test_response_t *resp = (test_response_t *) arg;
 
 	resp->revent.etype = wev_focus;
-	resp->revent.ev.focus.nfocus = nfocus;
 
 	fibril_mutex_lock(&resp->event_lock);
@@ -2188,10 +1650,9 @@
 }
 
-static void test_unfocus_event(void *arg, unsigned nfocus)
+static void test_unfocus_event(void *arg)
 {
 	test_response_t *resp = (test_response_t *) arg;
 
 	resp->revent.etype = wev_unfocus;
-	resp->revent.ev.unfocus.nfocus = nfocus;
 
 	fibril_mutex_lock(&resp->event_lock);
@@ -2209,5 +1670,4 @@
 	resp->create_rect = params->rect;
 	resp->create_min_size = params->min_size;
-	resp->create_idev_id = params->idev_id;
 	if (resp->rc == EOK)
 		*rwnd_id = resp->wnd_id;
@@ -2226,5 +1686,5 @@
 
 static errno_t test_window_move_req(void *arg, sysarg_t wnd_id,
-    gfx_coord2_t *pos, sysarg_t pos_id)
+    gfx_coord2_t *pos)
 {
 	test_response_t *resp = (test_response_t *) arg;
@@ -2233,5 +1693,4 @@
 	resp->move_req_wnd_id = wnd_id;
 	resp->move_req_pos = *pos;
-	resp->move_req_pos_id = pos_id;
 	return resp->rc;
 }
@@ -2260,20 +1719,6 @@
 }
 
-static errno_t test_window_get_max_rect(void *arg, sysarg_t wnd_id,
-    gfx_rect_t *rect)
-{
-	test_response_t *resp = (test_response_t *) arg;
-
-	resp->window_get_max_rect_called = true;
-	resp->get_max_rect_wnd_id = wnd_id;
-
-	if (resp->rc == EOK)
-		*rect = resp->get_max_rect_rrect;
-
-	return resp->rc;
-}
-
 static errno_t test_window_resize_req(void *arg, sysarg_t wnd_id,
-    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id)
+    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos)
 {
 	test_response_t *resp = (test_response_t *) arg;
@@ -2283,5 +1728,4 @@
 	resp->resize_req_wnd_id = wnd_id;
 	resp->resize_req_pos = *pos;
-	resp->resize_req_pos_id = pos_id;
 	return resp->rc;
 }
@@ -2299,31 +1743,4 @@
 }
 
-static errno_t test_window_minimize(void *arg, sysarg_t wnd_id)
-{
-	test_response_t *resp = (test_response_t *) arg;
-
-	resp->window_minimize_called = true;
-	resp->resize_wnd_id = wnd_id;
-	return resp->rc;
-}
-
-static errno_t test_window_maximize(void *arg, sysarg_t wnd_id)
-{
-	test_response_t *resp = (test_response_t *) arg;
-
-	resp->window_maximize_called = true;
-	resp->resize_wnd_id = wnd_id;
-	return resp->rc;
-}
-
-static errno_t test_window_unmaximize(void *arg, sysarg_t wnd_id)
-{
-	test_response_t *resp = (test_response_t *) arg;
-
-	resp->window_unmaximize_called = true;
-	resp->resize_wnd_id = wnd_id;
-	return resp->rc;
-}
-
 static errno_t test_window_set_cursor(void *arg, sysarg_t wnd_id,
     display_stock_cursor_t cursor)
@@ -2334,16 +1751,4 @@
 	resp->set_cursor_wnd_id = wnd_id;
 	resp->set_cursor_cursor = cursor;
-
-	return resp->rc;
-}
-
-static errno_t test_window_set_caption(void *arg, sysarg_t wnd_id,
-    const char *caption)
-{
-	test_response_t *resp = (test_response_t *) arg;
-
-	resp->window_set_caption_called = true;
-	resp->set_caption_wnd_id = wnd_id;
-	resp->set_caption_caption = str_dup(caption);
 
 	return resp->rc;
