diff --git a/types/wlr_ext_foreign_toplevel_list_v1.c b/types/wlr_ext_foreign_toplevel_list_v1.c index f20ddc877..cb2f21272 100644 --- a/types/wlr_ext_foreign_toplevel_list_v1.c +++ b/types/wlr_ext_foreign_toplevel_list_v1.c @@ -168,7 +168,7 @@ wlr_ext_foreign_toplevel_handle_v1_create(struct wlr_ext_foreign_toplevel_list_v return NULL; } - wl_list_insert(&list->toplevels, &toplevel->link); + wl_list_insert(list->toplevels.prev, &toplevel->link); toplevel->list = list; if (state->app_id) { toplevel->app_id = strdup(state->app_id);