Index: uspace/srv/hid/display/test/window.c
===================================================================
--- uspace/srv/hid/display/test/window.c	(revision dd7df1cd6dbadcfeee4d7063c1dff2bcf88c8521)
+++ uspace/srv/hid/display/test/window.c	(revision 9e84d2c5a3c35725eebdbe42c5716609678174c6)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2023 Jiri Svoboda
+ * Copyright (c) 2019 Jiri Svoboda
  * All rights reserved.
  *
@@ -36,5 +36,4 @@
 #include "../client.h"
 #include "../display.h"
-#include "../idevcfg.h"
 #include "../seat.h"
 #include "../window.h"
@@ -52,82 +51,4 @@
 };
 
-/** Test creating and destroying window */
-PCUT_TEST(create_destroy)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_bring_to_top() brings window to top */
-PCUT_TEST(bring_to_top)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *w1;
-	ds_window_t *w2;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &w1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_create(client, &params, &w2);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	/* w2 should be on the top */
-	PCUT_ASSERT_EQUALS(w2, ds_display_first_window(disp));
-
-	/* Bring w1 to top */
-	ds_window_bring_to_top(w1);
-
-	/* Now w1 should be on the top */
-	PCUT_ASSERT_EQUALS(w1, ds_display_first_window(disp));
-
-	ds_window_destroy(w1);
-	ds_window_destroy(w2);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
 /** Test ds_window_resize(). */
 PCUT_TEST(window_resize)
@@ -148,5 +69,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -178,246 +99,4 @@
 }
 
-/** Test ds_window_get_pos(). */
-PCUT_TEST(get_pos)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	gfx_coord2_t pos;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd->dpos.x = 100;
-	wnd->dpos.y = 100;
-
-	ds_window_get_pos(wnd, &pos);
-
-	PCUT_ASSERT_INT_EQUALS(100, pos.x);
-	PCUT_ASSERT_INT_EQUALS(100, pos.y);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_get_max_rect(). */
-PCUT_TEST(get_max_rect)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	gfx_rect_t rect;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd->dpos.x = 100;
-	wnd->dpos.y = 100;
-
-	ds_window_get_max_rect(wnd, &rect);
-
-	PCUT_ASSERT_INT_EQUALS(disp->rect.p0.x, rect.p0.x);
-	PCUT_ASSERT_INT_EQUALS(disp->rect.p0.y, rect.p0.y);
-	PCUT_ASSERT_INT_EQUALS(disp->rect.p1.x, rect.p1.x);
-	PCUT_ASSERT_INT_EQUALS(disp->rect.p1.y, rect.p1.y);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_minimize(). */
-PCUT_TEST(window_minimize)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_minimize(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_INT_EQUALS(wndf_minimized, wnd->flags & wndf_minimized);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_unminimize(). */
-PCUT_TEST(window_unminimize)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.flags |= wndf_minimized;
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_unminimize(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_INT_EQUALS(0, wnd->flags & wndf_minimized);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_maximize(). */
-PCUT_TEST(window_maximize)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd->dpos.x = 100;
-	wnd->dpos.y = 100;
-
-	rc = ds_window_maximize(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_INT_EQUALS(wndf_maximized, wnd->flags & wndf_maximized);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_unmaximize(). */
-PCUT_TEST(window_unmaximize)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd->dpos.x = 100;
-	wnd->dpos.y = 100;
-
-	rc = ds_window_maximize(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_unmaximize(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_INT_EQUALS(0, wnd->flags & wndf_maximized);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
 /** Test ds_window_get_ctx(). */
 PCUT_TEST(window_get_ctx)
@@ -437,5 +116,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -456,42 +135,4 @@
 }
 
-/** Test ds_window_is_visible() */
-PCUT_TEST(is_visible)
-{
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = ds_display_create(NULL, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 10;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_TRUE(ds_window_is_visible(wnd));
-
-	wnd->flags |= wndf_minimized;
-
-	PCUT_ASSERT_FALSE(ds_window_is_visible(wnd));
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
 /** Test ds_window_post_kbd_event() with Alt-F4 sends close event */
 PCUT_TEST(window_post_kbd_event_alt_f4)
@@ -517,5 +158,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -572,5 +213,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -624,82 +265,4 @@
 }
 
-/** Test ds_window_post_focus_event() */
-PCUT_TEST(window_post_focus_event)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_post_focus_event(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** Test ds_window_post_unfocus_event() */
-PCUT_TEST(window_post_unfocus_event)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_post_focus_event(wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
 /** Test ds_window_move_req() */
 PCUT_TEST(window_move_req)
@@ -712,5 +275,4 @@
 	display_wnd_params_t params;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
 	errno_t rc;
 
@@ -724,5 +286,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -738,11 +300,9 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-	ds_window_move_req(wnd, &pos, pos_id);
+	ds_window_move_req(wnd, &pos);
 
 	PCUT_ASSERT_INT_EQUALS(dsw_moving, wnd->state);
 	PCUT_ASSERT_INT_EQUALS(pos.x, wnd->orig_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, wnd->orig_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, wnd->orig_pos_id);
 
 	ds_window_destroy(wnd);
@@ -762,5 +322,4 @@
 	display_wnd_params_t params;
 	gfx_coord2_t pos;
-	sysarg_t pos_id;
 	errno_t rc;
 
@@ -774,5 +333,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -788,6 +347,5 @@
 	pos.x = 42;
 	pos.y = 43;
-	pos_id = 44;
-	ds_window_resize_req(wnd, display_wr_top_right, &pos, pos_id);
+	ds_window_resize_req(wnd, display_wr_top_right, &pos);
 
 	PCUT_ASSERT_INT_EQUALS(dsw_resizing, wnd->state);
@@ -795,5 +353,4 @@
 	PCUT_ASSERT_INT_EQUALS(pos.x, wnd->orig_pos.x);
 	PCUT_ASSERT_INT_EQUALS(pos.y, wnd->orig_pos.y);
-	PCUT_ASSERT_INT_EQUALS(pos_id, wnd->orig_pos_id);
 
 	ds_window_destroy(wnd);
@@ -823,5 +380,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -1093,5 +650,5 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = ds_seat_create(disp, "Alice", &seat);
+	rc = ds_seat_create(disp, &seat);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -1109,10 +666,4 @@
 	PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor);
 
-	// Check that invalid cursors cannot be set: ignore enum conversions
-	// as we are out-of-bounds
-#pragma GCC diagnostic push
-#if defined(__GNUC__) && (__GNUC__ >= 10)
-#pragma GCC diagnostic ignored "-Wenum-conversion"
-#endif
 	rc = ds_window_set_cursor(wnd, dcurs_limit);
 	PCUT_ASSERT_ERRNO_VAL(EINVAL, rc);
@@ -1122,5 +673,4 @@
 	PCUT_ASSERT_ERRNO_VAL(EINVAL, rc);
 	PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor);
-#pragma GCC diagnostic pop
 
 	rc = ds_window_set_cursor(wnd, dcurs_size_lr);
@@ -1134,271 +684,4 @@
 }
 
-/** Test ds_window_set_caption() */
-PCUT_TEST(window_set_caption)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor);
-
-	rc = ds_window_set_caption(wnd, "Hello");
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_INT_EQUALS(0, str_cmp("Hello", wnd->caption));
-
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** ds_window_find_next() finds next window by flags */
-PCUT_TEST(window_find_next)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *w0;
-	ds_window_t *w1;
-	ds_window_t *w2;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &w0);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_create(client, &params, &w1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	w1->flags |= wndf_minimized;
-
-	rc = ds_window_create(client, &params, &w2);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	w2->flags |= wndf_system;
-
-	wnd = ds_window_find_next(w0, wndf_minimized);
-	PCUT_ASSERT_EQUALS(w1, wnd);
-
-	wnd = ds_window_find_next(w0, wndf_system);
-	PCUT_ASSERT_EQUALS(w2, wnd);
-
-	wnd = ds_window_find_next(w0, wndf_maximized);
-	PCUT_ASSERT_NULL(wnd);
-
-	ds_window_destroy(w0);
-	ds_window_destroy(w1);
-	ds_window_destroy(w2);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** ds_window_find_prev() finds previous window by flags */
-PCUT_TEST(window_find_prev)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *w0;
-	ds_window_t *w1;
-	ds_window_t *w2;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &w2);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	w2->flags |= wndf_system;
-
-	rc = ds_window_create(client, &params, &w1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	w1->flags |= wndf_minimized;
-
-	rc = ds_window_create(client, &params, &w0);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd = ds_window_find_prev(w0, wndf_minimized);
-	PCUT_ASSERT_EQUALS(w1, wnd);
-
-	wnd = ds_window_find_prev(w0, wndf_system);
-	PCUT_ASSERT_EQUALS(w2, wnd);
-
-	wnd = ds_window_find_prev(w0, wndf_maximized);
-	PCUT_ASSERT_NULL(wnd);
-
-	ds_window_destroy(w0);
-	ds_window_destroy(w1);
-	ds_window_destroy(w2);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** ds_window_unfocus() switches to another window */
-PCUT_TEST(window_unfocus)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat;
-	ds_window_t *w0;
-	ds_window_t *w1;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &w1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_window_create(client, &params, &w0);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	PCUT_ASSERT_EQUALS(w0, seat->focus);
-
-	ds_window_unfocus(w0);
-
-	PCUT_ASSERT_EQUALS(w1, seat->focus);
-
-	ds_window_destroy(w0);
-	ds_window_destroy(w1);
-	ds_seat_destroy(seat);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
-/** ds_window_orig_seat() correctly compares seats */
-PCUT_TEST(window_orig_seat)
-{
-	gfx_context_t *gc;
-	ds_display_t *disp;
-	ds_client_t *client;
-	ds_seat_t *seat0;
-	ds_seat_t *seat1;
-	sysarg_t devid0;
-	sysarg_t devid1;
-	ds_idevcfg_t *cfg0;
-	ds_idevcfg_t *cfg1;
-	ds_window_t *wnd;
-	display_wnd_params_t params;
-	errno_t rc;
-
-	rc = gfx_context_new(&dummy_ops, NULL, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_display_create(gc, df_none, &disp);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_client_create(disp, NULL, NULL, &client);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Alice", &seat0);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_seat_create(disp, "Bob", &seat1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	display_wnd_params_init(&params);
-	params.rect.p0.x = params.rect.p0.y = 0;
-	params.rect.p1.x = params.rect.p1.y = 1;
-
-	rc = ds_window_create(client, &params, &wnd);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	devid0 = 42;
-	devid1 = 43;
-
-	rc = ds_idevcfg_create(disp, devid0, seat0, &cfg0);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	rc = ds_idevcfg_create(disp, devid1, seat1, &cfg1);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	wnd->state = dsw_moving;
-	wnd->orig_pos_id = devid0;
-
-	PCUT_ASSERT_TRUE(ds_window_orig_seat(wnd, devid0));
-	PCUT_ASSERT_FALSE(ds_window_orig_seat(wnd, devid1));
-
-	ds_idevcfg_destroy(cfg0);
-	ds_idevcfg_destroy(cfg1);
-	ds_window_destroy(wnd);
-	ds_seat_destroy(seat0);
-	ds_seat_destroy(seat1);
-	ds_client_destroy(client);
-	ds_display_destroy(disp);
-}
-
 static errno_t dummy_set_color(void *arg, gfx_color_t *color)
 {
