[mutter] wayland/output: Move struct to C file
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/output: Move struct to C file
- Date: Sun, 22 Aug 2021 17:06:11 +0000 (UTC)
commit fcbeae5f60641c8830b0164e3e1a54d8de8301d5
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Feb 5 16:47:33 2021 +0100
wayland/output: Move struct to C file
Avoids leaking implementation details outside.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1712>
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 5d085f12fd..bae4ee2dc9 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 4804681783..87b980f697 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 b0d8cf81c6..70c90e0dfd 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]