mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
wayland: Introduce MetaWaylandSurfaceRole
Introduce surface roles and use it to ensure a surface never changes role. https://bugzilla.gnome.org/show_bug.cgi?id=744452
This commit is contained in:
@ -36,6 +36,17 @@ struct _MetaWaylandSerial {
|
||||
uint32_t value;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_WAYLAND_SURFACE_ROLE_NONE,
|
||||
META_WAYLAND_SURFACE_ROLE_SUBSURFACE,
|
||||
META_WAYLAND_SURFACE_ROLE_XDG_SURFACE,
|
||||
META_WAYLAND_SURFACE_ROLE_XDG_POPUP,
|
||||
META_WAYLAND_SURFACE_ROLE_WL_SHELL_SURFACE,
|
||||
META_WAYLAND_SURFACE_ROLE_CURSOR,
|
||||
META_WAYLAND_SURFACE_ROLE_DND,
|
||||
} MetaWaylandSurfaceRole;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* wl_surface.attach */
|
||||
@ -66,6 +77,7 @@ struct _MetaWaylandSurface
|
||||
struct wl_resource *resource;
|
||||
MetaWaylandCompositor *compositor;
|
||||
MetaSurfaceActor *surface_actor;
|
||||
MetaWaylandSurfaceRole role;
|
||||
MetaWindow *window;
|
||||
MetaWaylandBuffer *buffer;
|
||||
struct wl_listener buffer_destroy_listener;
|
||||
@ -118,6 +130,11 @@ MetaWaylandSurface *meta_wayland_surface_create (MetaWaylandCompositor *composit
|
||||
struct wl_resource *compositor_resource,
|
||||
guint32 id);
|
||||
|
||||
int meta_wayland_surface_set_role (MetaWaylandSurface *surface,
|
||||
MetaWaylandSurfaceRole role,
|
||||
struct wl_resource *error_resource,
|
||||
uint32_t error_code);
|
||||
|
||||
void meta_wayland_surface_set_window (MetaWaylandSurface *surface,
|
||||
MetaWindow *window);
|
||||
|
||||
|
Reference in New Issue
Block a user