Index: uspace/srv/hid/display/client.c
===================================================================
--- uspace/srv/hid/display/client.c	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/client.c	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -93,16 +93,13 @@
  * @param client client
  * @param wnd Window
- * @return EOK on success, ENOMEM if there are no free window identifiers
- */
-errno_t ds_client_add_window(ds_client_t *client, ds_window_t *wnd)
+ */
+void ds_client_add_window(ds_client_t *client, ds_window_t *wnd)
 {
 	assert(wnd->client == NULL);
-	assert(!link_used(&wnd->lwindows));
+	assert(!link_used(&wnd->lcwindows));
 
 	wnd->client = client;
 	wnd->id = client->display->next_wnd_id++;
-	list_append(&wnd->lwindows, &client->windows);
-
-	return EOK;
+	list_append(&wnd->lcwindows, &client->windows);
 }
 
@@ -122,5 +119,5 @@
 	}
 
-	list_remove(&wnd->lwindows);
+	list_remove(&wnd->lcwindows);
 	wnd->client = NULL;
 }
@@ -162,5 +159,5 @@
 		return NULL;
 
-	return list_get_instance(link, ds_window_t, lwindows);
+	return list_get_instance(link, ds_window_t, lcwindows);
 }
 
@@ -172,10 +169,10 @@
 ds_window_t *ds_client_next_window(ds_window_t *wnd)
 {
-	link_t *link = list_next(&wnd->lwindows, &wnd->client->windows);
+	link_t *link = list_next(&wnd->lcwindows, &wnd->client->windows);
 
 	if (link == NULL)
 		return NULL;
 
-	return list_get_instance(link, ds_window_t, lwindows);
+	return list_get_instance(link, ds_window_t, lcwindows);
 }
 
Index: uspace/srv/hid/display/client.h
===================================================================
--- uspace/srv/hid/display/client.h	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/client.h	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -45,5 +45,5 @@
     ds_client_t **);
 extern void ds_client_destroy(ds_client_t *);
-extern errno_t ds_client_add_window(ds_client_t *, ds_window_t *);
+extern void ds_client_add_window(ds_client_t *, ds_window_t *);
 extern void ds_client_remove_window(ds_window_t *);
 extern ds_window_t *ds_client_find_window(ds_client_t *, ds_wnd_id_t);
Index: uspace/srv/hid/display/display.c
===================================================================
--- uspace/srv/hid/display/display.c	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/display.c	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -61,4 +61,5 @@
 	disp->next_wnd_id = 1;
 	list_initialize(&disp->seats);
+	list_initialize(&disp->windows);
 	*rdisp = disp;
 	return EOK;
@@ -163,4 +164,58 @@
 }
 
+/** Add window to display.
+ *
+ * @param display Display
+ * @param wnd Window
+ */
+void ds_display_add_window(ds_display_t *display, ds_window_t *wnd)
+{
+	assert(wnd->display == NULL);
+	assert(!link_used(&wnd->ldwindows));
+
+	wnd->display = display;
+	list_prepend(&wnd->ldwindows, &display->windows);
+}
+
+/** Remove window from display.
+ *
+ * @param wnd Window
+ */
+void ds_display_remove_window(ds_window_t *wnd)
+{
+	list_remove(&wnd->ldwindows);
+	wnd->display = NULL;
+}
+
+/** Get first window in display.
+ *
+ * @param display Display
+ * @return First window or @c NULL if there is none
+ */
+ds_window_t *ds_display_first_window(ds_display_t *display)
+{
+	link_t *link = list_first(&display->windows);
+
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, ds_window_t, ldwindows);
+}
+
+/** Get next window in client.
+ *
+ * @param wnd Current window
+ * @return Next window or @c NULL if there is none
+ */
+ds_window_t *ds_display_next_window(ds_window_t *wnd)
+{
+	link_t *link = list_next(&wnd->ldwindows, &wnd->display->windows);
+
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, ds_window_t, ldwindows);
+}
+
 /** Post keyboard event to a display.
  *
Index: uspace/srv/hid/display/display.h
===================================================================
--- uspace/srv/hid/display/display.h	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/display.h	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -51,4 +51,8 @@
 extern ds_client_t *ds_display_next_client(ds_client_t *);
 extern ds_window_t *ds_display_find_window(ds_display_t *, ds_wnd_id_t);
+extern void ds_display_add_window(ds_display_t *, ds_window_t *);
+extern void ds_display_remove_window(ds_window_t *);
+extern ds_window_t *ds_display_first_window(ds_display_t *);
+extern ds_window_t *ds_display_next_window(ds_window_t *);
 extern errno_t ds_display_post_kbd_event(ds_display_t *, kbd_event_t *);
 extern void ds_display_add_seat(ds_display_t *, ds_seat_t *);
Index: uspace/srv/hid/display/seat.c
===================================================================
--- uspace/srv/hid/display/seat.c	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/seat.c	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -82,8 +82,8 @@
 
 	if (seat->focus == wnd) {
-		/* Focus a different window. XXX Need list of all windows */
-		nwnd = ds_client_next_window(wnd);
+		/* Focus a different window. XXX Delegate to WM */
+		nwnd = ds_display_next_window(wnd);
 		if (nwnd == NULL)
-			nwnd = ds_client_first_window(wnd->client);
+			nwnd = ds_display_first_window(wnd->display);
 		if (nwnd == wnd)
 			nwnd = NULL;
Index: uspace/srv/hid/display/types/display/display.h
===================================================================
--- uspace/srv/hid/display/types/display/display.h	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/types/display/display.h	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -62,4 +62,7 @@
 	/** Seats (of ds_seat_t) */
 	list_t seats;
+
+	/** Windows (of ds_window_t) in stacking order */
+	list_t windows;
 } ds_display_t;
 
Index: uspace/srv/hid/display/types/display/window.h
===================================================================
--- uspace/srv/hid/display/types/display/window.h	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/types/display/window.h	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -49,5 +49,9 @@
 	struct ds_client *client;
 	/** Link to @c client->windows */
-	link_t lwindows;
+	link_t lcwindows;
+	/** Containing display */
+	struct ds_display *display;
+	/** Link to @c display->windows */
+	link_t ldwindows;
 	/** Display position */
 	gfx_coord2_t dpos;
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision cf32dbd4a95cb4b405fc474d3971f4fa4e52a5ad)
+++ uspace/srv/hid/display/window.c	(revision fd777a25b63bc4e2a12847a14ecca9cf36355a91)
@@ -205,4 +205,5 @@
 
 	ds_client_add_window(client, wnd);
+	ds_display_add_window(client->display, wnd);
 
 	wnd->gc = gc;
@@ -223,4 +224,5 @@
 {
 	ds_client_remove_window(wnd);
+	ds_display_remove_window(wnd);
 	(void) gfx_context_delete(wnd->gc);
 
