xdg-shell: use unified map logic

This commit is contained in:
Kirill Primak 2023-03-04 22:14:50 +03:00 committed by Isaac Freund
parent c590bb600f
commit b0437fc416
10 changed files with 28 additions and 60 deletions

View file

@ -14,8 +14,7 @@ struct wlr_xdg_surface *create_xdg_surface(
void destroy_xdg_surface(struct wlr_xdg_surface *surface);
void destroy_xdg_surface_role_object(struct wlr_xdg_surface *surface);
void xdg_surface_role_commit(struct wlr_surface *wlr_surface);
void xdg_surface_role_precommit(struct wlr_surface *wlr_surface,
const struct wlr_surface_state *state);
void xdg_surface_role_unmap(struct wlr_surface *wlr_surface);
void xdg_surface_role_destroy(struct wlr_surface *wlr_surface);
void create_xdg_positioner(struct wlr_xdg_client *client, uint32_t id);

View file

@ -251,7 +251,7 @@ struct wlr_xdg_surface {
struct wl_list popups; // wlr_xdg_popup.link
bool added, configured, mapped;
bool added, configured;
struct wl_event_source *configure_idle;
uint32_t scheduled_serial;
struct wl_list configure_list;
@ -264,22 +264,6 @@ struct wlr_xdg_surface {
struct wl_signal destroy;
struct wl_signal ping_timeout;
struct wl_signal new_popup;
/**
* The `map` event signals that the shell surface is ready to be
* managed by the compositor and rendered on the screen. At this point,
* the surface has configured its properties, has had the opportunity
* to bind to the seat to receive input events, and has a buffer that
* is ready to be rendered. You can now safely add this surface to a
* list of views.
*/
struct wl_signal map;
/**
* The `unmap` event signals that the surface is no longer in a state
* where it should be shown on the screen. This might happen if the
* surface no longer has a displayable buffer because either the
* surface has been hidden or is about to be destroyed.
*/
struct wl_signal unmap;
// for protocol extensions
struct wl_signal configure; // struct wlr_xdg_surface_configure