From 5233801530c5ccc95699a12ba7da2d7ce58c952c Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 26 Mar 2018 18:35:36 -0400 Subject: xdg-shell-v6: don't destroy role resources on unmap The motivation for this is: - `get_popup` and `get_toplevel` allocate role-specific resources. - On the first non-null commit, the surface gets mapped. - On a null commit, the surface gets unmapped. It can be mapped again with a non-null commit. - When the role object (xdg-toplevel or xdg-popup) is destroyed, the surface is unmapped and role-specific resources are destroyed. The client can call `get_popup` or `get_toplevel` again on that surface. - When the xdg-surface object is destroyed, the surface is unmapped, role-specific resources are destroyed and the surface itself is destroyed. --- include/wlr/types/wlr_xdg_shell.h | 1 + include/wlr/types/wlr_xdg_shell_v6.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 410663f7..a40a56f5 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -106,6 +106,7 @@ struct wlr_xdg_surface { uint32_t configure_next_serial; struct wl_list configure_list; + // Only for toplevel char *title; char *app_id; diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index 3bfb97a4..97ff4786 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -106,6 +106,7 @@ struct wlr_xdg_surface_v6 { uint32_t configure_next_serial; struct wl_list configure_list; + // Only for toplevel char *title; char *app_id; -- cgit v1.2.3