From fcbeae5f60641c8830b0164e3e1a54d8de8301d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 5 Feb 2021 16:47:33 +0100 Subject: [PATCH] wayland/output: Move struct to C file Avoids leaking implementation details outside. Part-of: --- src/wayland/meta-wayland-outputs.c | 18 ++++++++++++++++++ src/wayland/meta-wayland-outputs.h | 18 ------------------ 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;