Documentation for <wlr/types/wlr_viewporter.h>

Back to index

Table of contents

struct wlr_viewporter

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

Implementation for the viewporter protocol.

When enabling viewporter, compositors need to update their rendering logic:

- The size of the surface texture may not match the surface size anymore. Compositors must use the surface size only. - When rendering a surface texture, compositors should use wlr_surface_get_buffer_source_box() to get the source rectangle and crop the texture accordingly.

wlr_viewporter_create()

struct wlr_viewporter *wlr_viewporter_create(​struct wl_display *display);