Index: uspace/lib/display/src/display.c
===================================================================
--- uspace/lib/display/src/display.c	(revision 5d380b63867e347a3212398238dbe95d3b227d35)
+++ uspace/lib/display/src/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 <mem.h>
 #include <stdlib.h>
-#include <str.h>
 #include "../private/display.h"
 #include "../private/params.h"
@@ -69,5 +68,5 @@
 		dsname = SERVICE_NAME_DISPLAY;
 
-	rc = loc_service_get_id(dsname, &display_svc, 0);
+	rc = loc_service_get_id(dsname, &display_svc, IPC_FLAG_BLOCKING);
 	if (rc != EOK) {
 		free(display);
@@ -76,5 +75,5 @@
 
 	display->sess = loc_service_connect(display_svc, INTERFACE_DISPLAY,
-	    0);
+	    IPC_FLAG_BLOCKING);
 	if (display->sess == NULL) {
 		free(display);
@@ -148,5 +147,4 @@
 {
 	memset(params, 0, sizeof(*params));
-	params->caption = "";
 }
 
@@ -164,17 +162,8 @@
 {
 	display_window_t *window;
-	display_wnd_params_enc_t eparams;
-	async_exch_t *exch;
-	aid_t req;
-	ipc_call_t answer;
-	errno_t rc;
-
-	/* Encode the parameters for transport */
-	eparams.rect = params->rect;
-	eparams.caption_size = str_size(params->caption);
-	eparams.min_size = params->min_size;
-	eparams.pos = params->pos;
-	eparams.flags = params->flags;
-	eparams.idev_id = params->idev_id;
+	async_exch_t *exch;
+	aid_t req;
+	ipc_call_t answer;
+	errno_t rc;
 
 	window = calloc(1, sizeof(display_window_t));
@@ -184,18 +173,5 @@
 	exch = async_exchange_begin(display->sess);
 	req = async_send_0(exch, DISPLAY_WINDOW_CREATE, &answer);
-
-	/* Write fixed fields */
-	rc = async_data_write_start(exch, &eparams,
-	    sizeof (display_wnd_params_enc_t));
-	if (rc != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		free(window);
-		return rc;
-	}
-
-	/* Write caption */
-	rc = async_data_write_start(exch, params->caption,
-	    eparams.caption_size);
+	rc = async_data_write_start(exch, params, sizeof (display_wnd_params_t));
 	async_exchange_end(exch);
 	if (rc != EOK) {
@@ -285,18 +261,15 @@
  * @param window Window
  * @param pos Position in the window where the button was pressed
- * @param pos_id Positioning device ID
- * @return EOK on success or an error code
- */
-errno_t display_window_move_req(display_window_t *window, gfx_coord2_t *pos,
-    sysarg_t pos_id)
-{
-	async_exch_t *exch;
-	aid_t req;
-	ipc_call_t answer;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	req = async_send_2(exch, DISPLAY_WINDOW_MOVE_REQ, window->id,
-	    pos_id, &answer);
+ * @return EOK on success or an error code
+ */
+errno_t display_window_move_req(display_window_t *window, gfx_coord2_t *pos)
+{
+	async_exch_t *exch;
+	aid_t req;
+	ipc_call_t answer;
+	errno_t rc;
+
+	exch = async_exchange_begin(window->display->sess);
+	req = async_send_1(exch, DISPLAY_WINDOW_MOVE_REQ, window->id, &answer);
 	rc = async_data_write_start(exch, (void *)pos, sizeof (gfx_coord2_t));
 	async_exchange_end(exch);
@@ -377,36 +350,4 @@
 }
 
-/** Get display window maximized rectangle.
- *
- * Get the rectangle to which a window would be maximized.
- *
- * @param window Window
- * @param rect Place to store maximized rectangle
- * @return EOK on success or an error code
- */
-errno_t display_window_get_max_rect(display_window_t *window, gfx_rect_t *rect)
-{
-	async_exch_t *exch;
-	aid_t req;
-	ipc_call_t answer;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	req = async_send_1(exch, DISPLAY_WINDOW_GET_MAX_RECT, window->id,
-	    &answer);
-	rc = async_data_read_start(exch, rect, sizeof (gfx_rect_t));
-	async_exchange_end(exch);
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	async_wait_for(req, &rc);
-	if (rc != EOK)
-		return rc;
-
-	return EOK;
-}
-
 /** Request a window resize.
  *
@@ -418,18 +359,17 @@
  * @param rsztype Resize type (which part of window frame is being dragged)
  * @param pos Position in the window where the button was pressed
- * @param pos_id Positioning device ID
  * @return EOK on success or an error code
  */
 errno_t display_window_resize_req(display_window_t *window,
-    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id)
-{
-	async_exch_t *exch;
-	aid_t req;
-	ipc_call_t answer;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	req = async_send_3(exch, DISPLAY_WINDOW_RESIZE_REQ, window->id,
-	    (sysarg_t) rsztype, pos_id, &answer);
+    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos)
+{
+	async_exch_t *exch;
+	aid_t req;
+	ipc_call_t answer;
+	errno_t rc;
+
+	exch = async_exchange_begin(window->display->sess);
+	req = async_send_2(exch, DISPLAY_WINDOW_RESIZE_REQ, window->id,
+	    (sysarg_t) rsztype, &answer);
 	rc = async_data_write_start(exch, (void *)pos, sizeof (gfx_coord2_t));
 	async_exchange_end(exch);
@@ -515,55 +455,4 @@
 }
 
-/** Minimize window.
- *
- * @param window Window
- * @return EOK on success or an error code
- */
-errno_t display_window_minimize(display_window_t *window)
-{
-	async_exch_t *exch;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	rc = async_req_1_0(exch, DISPLAY_WINDOW_MINIMIZE, window->id);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-/** Maximize window.
- *
- * @param window Window
- * @return EOK on success or an error code
- */
-errno_t display_window_maximize(display_window_t *window)
-{
-	async_exch_t *exch;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	rc = async_req_1_0(exch, DISPLAY_WINDOW_MAXIMIZE, window->id);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
-/** Unmaximize window.
- *
- * @param window Window
- * @return EOK on success or an error code
- */
-errno_t display_window_unmaximize(display_window_t *window)
-{
-	async_exch_t *exch;
-	errno_t rc;
-
-	exch = async_exchange_begin(window->display->sess);
-	rc = async_req_1_0(exch, DISPLAY_WINDOW_UNMAXIMIZE, window->id);
-	async_exchange_end(exch);
-
-	return rc;
-}
-
 /** Set window cursor.
  *
@@ -585,37 +474,4 @@
 	    cursor);
 	async_exchange_end(exch);
-	return rc;
-}
-
-/** Set display window caption.
- *
- * @param window Window
- * @param caption New caption
- * @return EOK on success or an error code
- */
-errno_t display_window_set_caption(display_window_t *window,
-    const char *caption)
-{
-	async_exch_t *exch;
-	aid_t req;
-	ipc_call_t answer;
-	size_t cap_size;
-	errno_t rc;
-
-	cap_size = str_size(caption);
-
-	exch = async_exchange_begin(window->display->sess);
-	req = async_send_1(exch, DISPLAY_WINDOW_SET_CAPTION, window->id,
-	    &answer);
-
-	/* Write caption */
-	rc = async_data_write_start(exch, caption, cap_size);
-	async_exchange_end(exch);
-	if (rc != EOK) {
-		async_forget(req);
-		return rc;
-	}
-
-	async_wait_for(req, &rc);
 	return rc;
 }
@@ -721,6 +577,5 @@
 		case wev_focus:
 			if (window->cb != NULL && window->cb->focus_event != NULL) {
-				window->cb->focus_event(window->cb_arg,
-				    event.ev.focus.nfocus);
+				window->cb->focus_event(window->cb_arg);
 			}
 			break;
@@ -745,6 +600,5 @@
 		case wev_unfocus:
 			if (window->cb != NULL && window->cb->unfocus_event != NULL) {
-				window->cb->unfocus_event(window->cb_arg,
-				    event.ev.unfocus.nfocus);
+				window->cb->unfocus_event(window->cb_arg);
 			}
 			break;
