Index: uspace/lib/ui/test/popup.c
===================================================================
--- uspace/lib/ui/test/popup.c	(revision 46a47c0ecde5eec9824d8b22b70d9238a2b3a58e)
+++ uspace/lib/ui/test/popup.c	(revision c68c18b9bb5f07126605a1631863634fac2f1ffb)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2023 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * All rights reserved.
  *
@@ -64,5 +64,5 @@
 static errno_t test_ctl_paint(void *);
 static ui_evclaim_t test_ctl_pos_event(void *, pos_event_t *);
-static void test_ctl_unfocus(void *, unsigned);
+static void test_ctl_unfocus(void *);
 
 static ui_control_ops_t test_ctl_ops = {
@@ -91,5 +91,4 @@
 	pos_event_t pos_event;
 	bool unfocus;
-	unsigned unfocus_nfocus;
 } test_ctl_resp_t;
 
@@ -99,6 +98,4 @@
 	errno_t rc;
 	ui_t *ui = NULL;
-	ui_wnd_params_t wparams;
-	ui_window_t *window = NULL;
 	ui_popup_params_t params;
 	ui_popup_t *popup = NULL;
@@ -107,19 +104,11 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	ui_wnd_params_init(&wparams);
-	wparams.caption = "Hello";
-
-	rc = ui_window_create(ui, &wparams, &window);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_NOT_NULL(window);
-
 	ui_popup_params_init(&params);
 
-	rc = ui_popup_create(ui, window, &params, &popup);
+	rc = ui_popup_create(ui, NULL, &params, &popup);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(popup);
 
 	ui_popup_destroy(popup);
-	ui_window_destroy(window);
 	ui_destroy(ui);
 }
@@ -136,6 +125,4 @@
 	errno_t rc;
 	ui_t *ui = NULL;
-	ui_wnd_params_t wparams;
-	ui_window_t *window = NULL;
 	ui_popup_params_t params;
 	ui_popup_t *popup = NULL;
@@ -146,14 +133,7 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	ui_wnd_params_init(&wparams);
-	wparams.caption = "Hello";
-
-	rc = ui_window_create(ui, &wparams, &window);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_NOT_NULL(window);
-
 	ui_popup_params_init(&params);
 
-	rc = ui_popup_create(ui, window, &params, &popup);
+	rc = ui_popup_create(ui, NULL, &params, &popup);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(popup);
@@ -191,47 +171,40 @@
 
 	ui_popup_destroy(popup);
+	ui_destroy(ui);
+}
+
+/** ui_popup_get_res/gc() return valid objects */
+PCUT_TEST(get_res_gc)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_wnd_params_t params;
+	ui_window_t *window = NULL;
+	ui_resource_t *res;
+	gfx_context_t *gc;
+	gfx_rect_t rect;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_wnd_params_init(&params);
+	params.caption = "Hello";
+
+	rc = ui_window_create(ui, &params, &window);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(window);
+
+	res = ui_window_get_res(window);
+	PCUT_ASSERT_NOT_NULL(res);
+
+	gc = ui_window_get_gc(window);
+	PCUT_ASSERT_NOT_NULL(gc);
+
+	ui_window_get_app_rect(window, &rect);
+
 	ui_window_destroy(window);
 	ui_destroy(ui);
 }
 
-/** ui_popup_get_res/gc() return valid objects */
-PCUT_TEST(get_res_gc)
-{
-	errno_t rc;
-	ui_t *ui = NULL;
-	ui_wnd_params_t wparams;
-	ui_window_t *window = NULL;
-	ui_popup_params_t params;
-	ui_popup_t *popup = NULL;
-	ui_resource_t *res;
-	gfx_context_t *gc;
-
-	rc = ui_create_disp(NULL, &ui);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	ui_wnd_params_init(&wparams);
-	wparams.caption = "Hello";
-
-	rc = ui_window_create(ui, &wparams, &window);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_NOT_NULL(window);
-
-	ui_popup_params_init(&params);
-
-	rc = ui_popup_create(ui, window, &params, &popup);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_NOT_NULL(popup);
-
-	res = ui_popup_get_res(popup);
-	PCUT_ASSERT_NOT_NULL(res);
-
-	gc = ui_popup_get_gc(popup);
-	PCUT_ASSERT_NOT_NULL(gc);
-
-	ui_popup_destroy(popup);
-	ui_window_destroy(window);
-	ui_destroy(ui);
-}
-
 /** Test position event callback set via ui_popup_set_cb() */
 PCUT_TEST(send_pos)
@@ -239,6 +212,4 @@
 	errno_t rc;
 	ui_t *ui = NULL;
-	ui_wnd_params_t wparams;
-	ui_window_t *window = NULL;
 	ui_popup_params_t params;
 	ui_popup_t *popup = NULL;
@@ -249,14 +220,7 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	ui_wnd_params_init(&wparams);
-	wparams.caption = "Hello";
-
-	rc = ui_window_create(ui, &wparams, &window);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-	PCUT_ASSERT_NOT_NULL(window);
-
 	ui_popup_params_init(&params);
 
-	rc = ui_popup_create(ui, window, &params, &popup);
+	rc = ui_popup_create(ui, NULL, &params, &popup);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_NOT_NULL(popup);
@@ -287,5 +251,4 @@
 
 	ui_popup_destroy(popup);
-	ui_window_destroy(window);
 	ui_destroy(ui);
 }
@@ -342,10 +305,9 @@
 }
 
-static void test_ctl_unfocus(void *arg, unsigned nfocus)
+static void test_ctl_unfocus(void *arg)
 {
 	test_ctl_resp_t *resp = (test_ctl_resp_t *) arg;
 
 	resp->unfocus = true;
-	resp->unfocus_nfocus = nfocus;
 }
 
