diff options
author | Jonas Ã…dahl <jadahl@gmail.com> | 2021-02-05 16:47:33 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-08-22 16:40:42 +0000 |
commit | fcbeae5f60641c8830b0164e3e1a54d8de8301d5 (patch) | |
tree | 98fa75908c16198d1f4f1dc56df5044a229fd972 /src | |
parent | 2b59b85d858978a16834eccbc708d723f4a46c38 (diff) | |
download | mutter-fcbeae5f60641c8830b0164e3e1a54d8de8301d5.tar.gz |
wayland/output: Move struct to C file
Avoids leaking implementation details outside.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1712>
Diffstat (limited to 'src')
-rw-r--r-- | src/wayland/meta-wayland-outputs.c | 18 | ||||
-rw-r--r-- | src/wayland/meta-wayland-outputs.h | 18 | ||||
-rw-r--r-- | src/wayland/meta-wayland-presentation-time.c | 4 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c index 5d085f12f..bae4ee2dc 100644 --- a/src/wayland/meta-wayland-outputs.c +++ b/src/wayland/meta-wayland-outputs.c @@ -48,6 +48,24 @@ enum static guint signals[LAST_SIGNAL]; +struct _MetaWaylandOutput +{ + GObject parent; + + struct wl_global *global; + MetaLogicalMonitor *logical_monitor; + uint32_t mode_flags; + float refresh_rate; + int scale; + int mode_width; + int mode_height; + + GList *resources; + GList *xdg_output_resources; + + uint64_t winsys_id; +}; + G_DEFINE_TYPE (MetaWaylandOutput, meta_wayland_output, G_TYPE_OBJECT) static void diff --git a/src/wayland/meta-wayland-outputs.h b/src/wayland/meta-wayland-outputs.h index 480468178..87b980f69 100644 --- a/src/wayland/meta-wayland-outputs.h +++ b/src/wayland/meta-wayland-outputs.h @@ -32,24 +32,6 @@ G_DECLARE_FINAL_TYPE (MetaWaylandOutput, meta_wayland_output, META, WAYLAND_OUTPUT, GObject) -struct _MetaWaylandOutput -{ - GObject parent; - - struct wl_global *global; - MetaLogicalMonitor *logical_monitor; - guint mode_flags; - float refresh_rate; - gint scale; - int mode_width; - int mode_height; - - GList *resources; - GList *xdg_output_resources; - - uint64_t winsys_id; -}; - const GList * meta_wayland_output_get_resources (MetaWaylandOutput *wayland_output); MetaLogicalMonitor * meta_wayland_output_get_logical_monitor (MetaWaylandOutput *wayland_output); diff --git a/src/wayland/meta-wayland-presentation-time.c b/src/wayland/meta-wayland-presentation-time.c index b0d8cf81c..70c90e0df 100644 --- a/src/wayland/meta-wayland-presentation-time.c +++ b/src/wayland/meta-wayland-presentation-time.c @@ -310,7 +310,7 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee uint32_t refresh_interval_ns; uint32_t seq_hi, seq_lo; uint32_t flags; - GList *l; + const GList *l; if (output == NULL) { @@ -343,7 +343,7 @@ meta_wayland_presentation_feedback_present (MetaWaylandPresentationFeedback *fee if (frame_info->flags & CLUTTER_FRAME_INFO_FLAG_VSYNC) flags |= WP_PRESENTATION_FEEDBACK_KIND_VSYNC; - for (l = output->resources; l; l = l->next) + for (l = meta_wayland_output_get_resources (output); l; l = l->next) { struct wl_resource *output_resource = l->data; |