xdg-foreign: clean up

This commit removes extra wlr_xdg_toplevel_set_parent() calls,
simplifies wlr_surface->wlr_xdg_toplevel conversion logic, makes related
structures store wlr_xdg_toplevel objects directly instead of
wlr_surface objects, and improves the code style.
This commit is contained in:
Kirill Primak 2024-08-14 15:49:09 +03:00
parent 2c64f36e88
commit 6c8eabcecd
5 changed files with 54 additions and 78 deletions

View file

@ -33,7 +33,7 @@ struct wlr_xdg_foreign_exported {
struct wl_list link; // wlr_xdg_foreign_registry.exported_surfaces
struct wlr_xdg_foreign_registry *registry;
struct wlr_surface *surface;
struct wlr_xdg_toplevel *toplevel;
char handle[WLR_XDG_FOREIGN_HANDLE_SIZE];

View file

@ -50,7 +50,7 @@ struct wlr_xdg_imported_v1 {
struct wlr_xdg_imported_child_v1 {
struct wlr_xdg_imported_v1 *imported;
struct wlr_surface *surface;
struct wlr_xdg_toplevel *toplevel;
struct wl_list link; // wlr_xdg_imported_v1.children

View file

@ -50,7 +50,7 @@ struct wlr_xdg_imported_v2 {
struct wlr_xdg_imported_child_v2 {
struct wlr_xdg_imported_v2 *imported;
struct wlr_surface *surface;
struct wlr_xdg_toplevel *toplevel;
struct wl_list link; // wlr_xdg_imported_v2.children