diff --git a/lib/mks-paintable.c b/lib/mks-paintable.c index 95de7e3..0ac25b2 100644 --- a/lib/mks-paintable.c +++ b/lib/mks-paintable.c @@ -725,7 +725,7 @@ _mks_paintable_new (GCancellable *cancellable, /* Create a socketpair() to use for D-Bus P2P protocol. We will be receiving * DMA-BUF FDs over this. */ - if (!create_socketpair (&us, &them, error)) + if (!mks_socketpair_create (&us, &them, error)) return NULL; /* Create socket for our side of the socket pair */ diff --git a/lib/mks-session.h b/lib/mks-session.h index 7696590..9a14de0 100644 --- a/lib/mks-session.h +++ b/lib/mks-session.h @@ -61,6 +61,4 @@ const char *mks_session_get_uuid (MksSession *se MKS_AVAILABLE_IN_ALL MksScreen *mks_session_ref_screen (MksSession *self); -G_DEFINE_AUTOPTR_CLEANUP_FUNC (MksSpeaker, g_object_unref) - G_END_DECLS diff --git a/lib/mks-speaker.h b/lib/mks-speaker.h index 16989b6..db8f9d0 100644 --- a/lib/mks-speaker.h +++ b/lib/mks-speaker.h @@ -43,4 +43,6 @@ MKS_AVAILABLE_IN_ALL void mks_speaker_set_muted (MksSpeaker *self, gboolean muted); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MksSpeaker, g_object_unref) + G_END_DECLS diff --git a/lib/mks-types.h b/lib/mks-types.h index d8c925e..7047af9 100644 --- a/lib/mks-types.h +++ b/lib/mks-types.h @@ -35,7 +35,6 @@ typedef struct _MksMouse MksMouse; typedef struct _MksScreen MksScreen; typedef struct _MksSession MksSession; typedef struct _MksScreenAttributes MksScreenAttributes; -typedef struct _MksSpeaker MksSpeaker; typedef struct _MksTouchable MksTouchable; G_END_DECLS diff --git a/lib/mks-util-private.h b/lib/mks-util-private.h index ad36f1b..20df145 100644 --- a/lib/mks-util-private.h +++ b/lib/mks-util-private.h @@ -44,7 +44,7 @@ G_BEGIN_DECLS #endif -gboolean create_socketpair (int *us, +gboolean mks_socketpair_create (int *us, int *them, GError **error); gboolean mks_scroll_event_is_inverted (GdkEvent *event); diff --git a/lib/mks-util.c b/lib/mks-util.c index 1a7495c..fea4fa8 100644 --- a/lib/mks-util.c +++ b/lib/mks-util.c @@ -92,9 +92,9 @@ mks_scroll_event_is_inverted (GdkEvent *event) } gboolean -create_socketpair (int *us, - int *them, - GError **error) +mks_socketpair_create (int *us, + int *them, + GError **error) { int fds[2]; int rv; @@ -165,7 +165,7 @@ mks_socketpair_connection_new (GDBusConnectionFlags flags, g_task_set_source_tag (task, mks_socketpair_connection_new); g_task_set_task_data (task, GINT_TO_POINTER (-1), NULL); - if (!create_socketpair (&us, &them, &error) || + if (!mks_socketpair_create (&us, &them, &error) || !(socket = g_socket_new_from_fd (us, &error))) { g_task_return_error (task, g_steal_pointer (&error));