Documentation for <wlr/types/wlr_subcompositor.h>

Back to index

Table of contents

struct wlr_subcompositor

struct wlr_subcompositor {
	struct wl_global *global;
	
	struct {
		struct wl_signal destroy;
	} events;
	
	struct {
		struct wl_listener display_destroy;
	} WLR_PRIVATE;
};

wlr_subcompositor_create()

struct wlr_subcompositor *wlr_subcompositor_create(​struct wl_display *display);

struct wlr_subsurface

struct wlr_subsurface {
	struct wl_resource *resource;
	struct wlr_surface *surface;
	struct wlr_surface *parent;
	
	struct wlr_subsurface_parent_state current, pending;
	
	uint32_t cached_seq;
	bool has_cache;
	
	bool synchronized;
	bool added;
	
	struct {
		struct wl_signal destroy;
	} events;
	
	void *data;
	
	struct {
		struct wlr_surface_synced parent_synced;
		
		struct wl_listener surface_client_commit;
		struct wl_listener parent_destroy;
	} WLR_PRIVATE;
};

struct wlr_subsurface_parent_state

struct wlr_subsurface_parent_state {
	int32_t x, y;
	struct wl_list link;
	
	struct {
		struct wlr_surface_synced *synced;
	} WLR_PRIVATE;
};

The sub-surface state describing the sub-surface's relationship with its parent. Contrary to other states, this one is not applied on surface commit. Instead, it's applied on parent surface commit.

wlr_subsurface_try_from_wlr_surface()

struct wlr_subsurface *wlr_subsurface_try_from_wlr_surface(​struct wlr_surface *surface);

Get a struct wlr_subsurface from a struct wlr_surface.

Returns NULL if the surface doesn't have the subsurface role or if the subsurface has been destroyed.