mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
wayland: Make the pending surface state a GObject
Making the pending state an GObject makes it easier to extend it with additional optional state without putting everything inside one big struct. https://bugzilla.gnome.org/show_bug.cgi?id=744104
This commit is contained in:
@ -44,6 +44,12 @@ G_DECLARE_FINAL_TYPE (MetaWaylandSurface,
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaWaylandSurfaceRole, meta_wayland_surface_role,
|
||||
META, WAYLAND_SURFACE_ROLE, GObject);
|
||||
|
||||
#define META_TYPE_WAYLAND_PENDING_STATE (meta_wayland_pending_state_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandPendingState,
|
||||
meta_wayland_pending_state,
|
||||
META, WAYLAND_PENDING_STATE,
|
||||
GObject);
|
||||
|
||||
struct _MetaWaylandSurfaceRoleClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
@ -92,6 +98,8 @@ G_DECLARE_FINAL_TYPE (MetaWaylandSurfaceRoleDND,
|
||||
|
||||
struct _MetaWaylandPendingState
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
/* wl_surface.attach */
|
||||
gboolean newly_attached;
|
||||
MetaWaylandBuffer *buffer;
|
||||
@ -161,7 +169,7 @@ struct _MetaWaylandSurface
|
||||
} dnd;
|
||||
|
||||
/* All the pending state that wl_surface.commit will apply. */
|
||||
MetaWaylandPendingState pending;
|
||||
MetaWaylandPendingState *pending;
|
||||
|
||||
/* Extension resources. */
|
||||
struct wl_resource *xdg_surface;
|
||||
@ -202,7 +210,7 @@ struct _MetaWaylandSurface
|
||||
* state here.
|
||||
*/
|
||||
gboolean synchronous;
|
||||
MetaWaylandPendingState pending;
|
||||
MetaWaylandPendingState *pending;
|
||||
|
||||
int32_t pending_x;
|
||||
int32_t pending_y;
|
||||
|
Reference in New Issue
Block a user