Index: uspace/srv/hid/display/client.c
===================================================================
--- uspace/srv/hid/display/client.c	(revision b3eeae586ec8b5fd5a43327f136f78e7ef242102)
+++ uspace/srv/hid/display/client.c	(revision 46a47c0ecde5eec9824d8b22b70d9238a2b3a58e)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2021 Jiri Svoboda
+ * Copyright (c) 2023 Jiri Svoboda
  * All rights reserved.
  *
@@ -257,8 +257,10 @@
  * @param client Client
  * @param ewindow Window that the message is targetted to
- *
- * @return EOK on success or an error code
- */
-errno_t ds_client_post_focus_event(ds_client_t *client, ds_window_t *ewindow)
+ * @param event Focus event data
+ *
+ * @return EOK on success or an error code
+ */
+errno_t ds_client_post_focus_event(ds_client_t *client, ds_window_t *ewindow,
+    display_wnd_focus_ev_t *event)
 {
 	ds_window_ev_t *wevent;
@@ -270,4 +272,5 @@
 	wevent->window = ewindow;
 	wevent->event.etype = wev_focus;
+	wevent->event.ev.focus = *event;
 	list_append(&wevent->levents, &client->events);
 
@@ -373,8 +376,10 @@
  * @param client Client
  * @param ewindow Window that the message is targetted to
- *
- * @return EOK on success or an error code
- */
-errno_t ds_client_post_unfocus_event(ds_client_t *client, ds_window_t *ewindow)
+ * @param event Unfocus event data
+ *
+ * @return EOK on success or an error code
+ */
+errno_t ds_client_post_unfocus_event(ds_client_t *client, ds_window_t *ewindow,
+    display_wnd_unfocus_ev_t *event)
 {
 	ds_window_ev_t *wevent;
@@ -386,4 +391,5 @@
 	wevent->window = ewindow;
 	wevent->event.etype = wev_unfocus;
+	wevent->event.ev.unfocus = *event;
 	list_append(&wevent->levents, &client->events);
 
Index: uspace/srv/hid/display/client.h
===================================================================
--- uspace/srv/hid/display/client.h	(revision b3eeae586ec8b5fd5a43327f136f78e7ef242102)
+++ uspace/srv/hid/display/client.h	(revision 46a47c0ecde5eec9824d8b22b70d9238a2b3a58e)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2019 Jiri Svoboda
+ * Copyright (c) 2023 Jiri Svoboda
  * All rights reserved.
  *
@@ -55,5 +55,6 @@
 extern void ds_client_purge_window_events(ds_client_t *, ds_window_t *);
 extern errno_t ds_client_post_close_event(ds_client_t *, ds_window_t *);
-extern errno_t ds_client_post_focus_event(ds_client_t *, ds_window_t *);
+extern errno_t ds_client_post_focus_event(ds_client_t *, ds_window_t *,
+    display_wnd_focus_ev_t *);
 extern errno_t ds_client_post_kbd_event(ds_client_t *, ds_window_t *,
     kbd_event_t *);
@@ -62,5 +63,6 @@
 extern errno_t ds_client_post_resize_event(ds_client_t *, ds_window_t *,
     gfx_rect_t *);
-extern errno_t ds_client_post_unfocus_event(ds_client_t *, ds_window_t *);
+extern errno_t ds_client_post_unfocus_event(ds_client_t *, ds_window_t *,
+    display_wnd_unfocus_ev_t *);
 
 #endif
Index: uspace/srv/hid/display/test/client.c
===================================================================
--- uspace/srv/hid/display/test/client.c	(revision b3eeae586ec8b5fd5a43327f136f78e7ef242102)
+++ uspace/srv/hid/display/test/client.c	(revision 46a47c0ecde5eec9824d8b22b70d9238a2b3a58e)
@@ -240,4 +240,5 @@
 	display_wnd_params_t params;
 	ds_window_t *rwindow;
+	display_wnd_focus_ev_t efocus;
 	display_wnd_ev_t revent;
 	bool called_cb = NULL;
@@ -271,5 +272,7 @@
 	PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
 
-	rc = ds_client_post_focus_event(client, wnd);
+	efocus.nfocus = 42;
+
+	rc = ds_client_post_focus_event(client, wnd, &efocus);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_TRUE(called_cb);
@@ -279,4 +282,5 @@
 	PCUT_ASSERT_EQUALS(wnd, rwindow);
 	PCUT_ASSERT_EQUALS(wev_focus, revent.etype);
+	PCUT_ASSERT_INT_EQUALS(efocus.nfocus, revent.ev.focus.nfocus);
 
 	rc = ds_client_get_event(client, &rwindow, &revent);
@@ -504,4 +508,5 @@
 	display_wnd_params_t params;
 	ds_window_t *rwindow;
+	display_wnd_unfocus_ev_t eunfocus;
 	display_wnd_ev_t revent;
 	bool called_cb = NULL;
@@ -535,5 +540,7 @@
 	PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
 
-	rc = ds_client_post_unfocus_event(client, wnd);
+	eunfocus.nfocus = 42;
+
+	rc = ds_client_post_unfocus_event(client, wnd, &eunfocus);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 	PCUT_ASSERT_TRUE(called_cb);
@@ -543,4 +550,5 @@
 	PCUT_ASSERT_EQUALS(wnd, rwindow);
 	PCUT_ASSERT_EQUALS(wev_unfocus, revent.etype);
+	PCUT_ASSERT_INT_EQUALS(eunfocus.nfocus, revent.ev.unfocus.nfocus);
 
 	rc = ds_client_get_event(client, &rwindow, &revent);
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision b3eeae586ec8b5fd5a43327f136f78e7ef242102)
+++ uspace/srv/hid/display/window.c	(revision 46a47c0ecde5eec9824d8b22b70d9238a2b3a58e)
@@ -680,4 +680,5 @@
 errno_t ds_window_post_focus_event(ds_window_t *wnd)
 {
+	display_wnd_focus_ev_t efocus;
 	errno_t rc;
 	ds_wmclient_t *wmclient;
@@ -685,10 +686,11 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_post_focus_event");
 
-	rc = ds_client_post_focus_event(wnd->client, wnd);
+	/* Increase focus counter */
+	++wnd->nfocus;
+	efocus.nfocus = wnd->nfocus;
+
+	rc = ds_client_post_focus_event(wnd->client, wnd, &efocus);
 	if (rc != EOK)
 		return rc;
-
-	/* Increase focus counter */
-	++wnd->nfocus;
 
 	/* Notify window managers about window information change */
@@ -709,4 +711,5 @@
 errno_t ds_window_post_unfocus_event(ds_window_t *wnd)
 {
+	display_wnd_unfocus_ev_t eunfocus;
 	errno_t rc;
 	ds_wmclient_t *wmclient;
@@ -714,10 +717,11 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_post_unfocus_event");
 
-	rc = ds_client_post_unfocus_event(wnd->client, wnd);
+	/* Decrease focus counter */
+	--wnd->nfocus;
+	eunfocus.nfocus = wnd->nfocus;
+
+	rc = ds_client_post_unfocus_event(wnd->client, wnd, &eunfocus);
 	if (rc != EOK)
 		return rc;
-
-	/* Decrease focus counter */
-	--wnd->nfocus;
 
 	/* Notify window managers about window information change */
