mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland/surface: Expose the MetaWindow of the MetaWaylandSurface as a property
This allows Mutter users to have access to the window without having to expose the whole MetaWaylandSurface class. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3298>
This commit is contained in:
parent
c4b9431bb2
commit
9886dcc001
@ -82,6 +82,7 @@ enum
|
||||
PROP_0,
|
||||
|
||||
PROP_SCANOUT_CANDIDATE,
|
||||
PROP_WINDOW,
|
||||
|
||||
N_PROPS
|
||||
};
|
||||
@ -1776,6 +1777,9 @@ meta_wayland_surface_get_property (GObject *object,
|
||||
case PROP_SCANOUT_CANDIDATE:
|
||||
g_value_set_object (value, surface->scanout_candidate);
|
||||
break;
|
||||
case PROP_WINDOW:
|
||||
g_value_set_object (value, meta_wayland_surface_get_window (surface));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -1795,6 +1799,12 @@ meta_wayland_surface_class_init (MetaWaylandSurfaceClass *klass)
|
||||
META_TYPE_CRTC,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_props[PROP_WINDOW] =
|
||||
g_param_spec_object ("window", NULL, NULL,
|
||||
META_TYPE_WINDOW,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
g_object_class_install_properties (object_class, N_PROPS, obj_props);
|
||||
|
||||
surface_signals[SURFACE_DESTROY] =
|
||||
|
Loading…
Reference in New Issue
Block a user