From ad49ecccf7e87143afe827a823da7154312c42dc Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sat, 6 Jan 2024 10:48:28 +0100 Subject: [PATCH] compositor: Drop unused private functions Part-of: --- .../meta-background-actor-private.h | 7 ------ src/compositor/meta-background-actor.c | 20 +--------------- src/compositor/meta-dnd-private.h | 2 -- src/compositor/meta-dnd.c | 12 ++-------- src/compositor/meta-feedback-actor-private.h | 5 ---- src/compositor/meta-feedback-actor.c | 23 ------------------- src/compositor/meta-later-private.h | 2 -- src/compositor/meta-shaped-texture-private.h | 1 - src/compositor/meta-shaped-texture.c | 8 ------- src/compositor/meta-window-actor-private.h | 2 -- src/meson.build | 1 - 11 files changed, 3 insertions(+), 80 deletions(-) delete mode 100644 src/compositor/meta-background-actor-private.h diff --git a/src/compositor/meta-background-actor-private.h b/src/compositor/meta-background-actor-private.h deleted file mode 100644 index d9878c663..000000000 --- a/src/compositor/meta-background-actor-private.h +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -#pragma once - -#include "meta/meta-background-actor.h" - -MtkRegion *meta_background_actor_get_clip_region (MetaBackgroundActor *self); diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c index a58d41a41..85c0cba8f 100644 --- a/src/compositor/meta-background-actor.c +++ b/src/compositor/meta-background-actor.c @@ -21,10 +21,9 @@ #include "config.h" -#include "compositor/meta-background-actor-private.h" #include "compositor/meta-background-content-private.h" - #include "compositor/meta-cullable.h" +#include "meta/meta-background-actor.h" enum { @@ -193,20 +192,3 @@ cullable_iface_init (MetaCullableInterface *iface) iface->cull_unobscured = meta_background_actor_cull_unobscured; iface->cull_redraw_clip = meta_background_actor_cull_redraw_clip; } - -/** - * meta_background_actor_get_clip_region: - * @self: a #MetaBackgroundActor - * - * Return value (transfer none): a #MtkRegion that represents the part of - * the background not obscured by other #MetaBackgroundActor or - * #MetaWindowActor objects. - */ -MtkRegion * -meta_background_actor_get_clip_region (MetaBackgroundActor *self) -{ - if (!self->content) - return NULL; - - return meta_background_content_get_clip_region (self->content); -} diff --git a/src/compositor/meta-dnd-private.h b/src/compositor/meta-dnd-private.h index c9a1dc4ed..8c50a8664 100644 --- a/src/compositor/meta-dnd-private.h +++ b/src/compositor/meta-dnd-private.h @@ -21,5 +21,3 @@ #include "meta/meta-dnd.h" MetaDnd * meta_dnd_new (MetaBackend *backend); - -MetaBackend * meta_dnd_get_backend (MetaDnd *dnd); diff --git a/src/compositor/meta-dnd.c b/src/compositor/meta-dnd.c index de37c1271..e64ae96df 100644 --- a/src/compositor/meta-dnd.c +++ b/src/compositor/meta-dnd.c @@ -117,14 +117,6 @@ meta_dnd_new (MetaBackend *backend) return dnd; } -MetaBackend * -meta_dnd_get_backend (MetaDnd *dnd) -{ - MetaDndPrivate *priv = meta_dnd_get_instance_private (dnd); - - return priv->backend; -} - #ifdef HAVE_X11 void meta_dnd_init_xdnd (MetaX11Display *x11_display) @@ -252,8 +244,8 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend, static MetaWaylandDataDevice * data_device_from_dnd (MetaDnd *dnd) { - MetaBackend *backend = meta_dnd_get_backend (dnd); - MetaContext *context = meta_backend_get_context (backend); + MetaDndPrivate *priv = meta_dnd_get_instance_private (dnd); + MetaContext *context = meta_backend_get_context (priv->backend); MetaWaylandCompositor *compositor = meta_context_get_wayland_compositor (context); diff --git a/src/compositor/meta-feedback-actor-private.h b/src/compositor/meta-feedback-actor-private.h index e86d799f5..74620bb48 100644 --- a/src/compositor/meta-feedback-actor-private.h +++ b/src/compositor/meta-feedback-actor-private.h @@ -44,11 +44,6 @@ struct _MetaFeedbackActorClass ClutterActorClass parent_class; }; - -ClutterActor * meta_feedback_actor_new (MetaCompositor *compositor, - float anchor_x, - float anchor_y); - void meta_feedback_actor_set_anchor (MetaFeedbackActor *actor, float anchor_x, float anchor_y); diff --git a/src/compositor/meta-feedback-actor.c b/src/compositor/meta-feedback-actor.c index 35749fba0..98703228c 100644 --- a/src/compositor/meta-feedback-actor.c +++ b/src/compositor/meta-feedback-actor.c @@ -196,29 +196,6 @@ meta_feedback_actor_init (MetaFeedbackActor *self) clutter_actor_set_reactive (CLUTTER_ACTOR (self), FALSE); } -/** - * meta_feedback_actor_new: - * - * Creates a new actor to draw the current drag and drop surface. - * - * Return value: the newly created background actor - */ -ClutterActor * -meta_feedback_actor_new (MetaCompositor *compositor, - float anchor_x, - float anchor_y) -{ - MetaFeedbackActor *self; - - self = g_object_new (META_TYPE_FEEDBACK_ACTOR, - "compositor", compositor, - "anchor-x", anchor_x, - "anchor-y", anchor_y, - NULL); - - return CLUTTER_ACTOR (self); -} - void meta_feedback_actor_set_anchor (MetaFeedbackActor *self, float anchor_x, diff --git a/src/compositor/meta-later-private.h b/src/compositor/meta-later-private.h index 4456acb32..b77d0f16c 100644 --- a/src/compositor/meta-later-private.h +++ b/src/compositor/meta-later-private.h @@ -20,5 +20,3 @@ #include "meta/types.h" MetaLaters * meta_laters_new (MetaCompositor *compositor); - -void meta_laters_free (MetaLaters *laters); diff --git a/src/compositor/meta-shaped-texture-private.h b/src/compositor/meta-shaped-texture-private.h index 1a6a5f194..482914c17 100644 --- a/src/compositor/meta-shaped-texture-private.h +++ b/src/compositor/meta-shaped-texture-private.h @@ -51,7 +51,6 @@ void meta_shaped_texture_set_viewport_dst_size (MetaShapedTexture *stex, void meta_shaped_texture_reset_viewport_dst_size (MetaShapedTexture *stex); void meta_shaped_texture_set_buffer_scale (MetaShapedTexture *stex, int buffer_scale); -int meta_shaped_texture_get_buffer_scale (MetaShapedTexture *stex); gboolean meta_shaped_texture_update_area (MetaShapedTexture *stex, int x, diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 9f4e4cee0..655b32506 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -1535,14 +1535,6 @@ meta_shaped_texture_set_buffer_scale (MetaShapedTexture *stex, invalidate_size (stex); } -int -meta_shaped_texture_get_buffer_scale (MetaShapedTexture *stex) -{ - g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), 1.0); - - return stex->buffer_scale; -} - /** * meta_shaped_texture_get_width: * @stex: A #MetaShapedTexture diff --git a/src/compositor/meta-window-actor-private.h b/src/compositor/meta-window-actor-private.h index efd335f57..9e86b20f4 100644 --- a/src/compositor/meta-window-actor-private.h +++ b/src/compositor/meta-window-actor-private.h @@ -70,8 +70,6 @@ MetaWindowActorChanges meta_window_actor_sync_actor_geometry (MetaWindowActor *s gboolean did_placement); void meta_window_actor_update_opacity (MetaWindowActor *self); -void meta_window_actor_mapped (MetaWindowActor *self); -void meta_window_actor_unmapped (MetaWindowActor *self); void meta_window_actor_sync_updates_frozen (MetaWindowActor *self); META_EXPORT_TEST diff --git a/src/meson.build b/src/meson.build index d3b75fe82..3b7f2015a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -294,7 +294,6 @@ mutter_sources = [ 'compositor/edge-resistance.c', 'compositor/edge-resistance.h', 'compositor/meta-background-actor.c', - 'compositor/meta-background-actor-private.h', 'compositor/meta-background-content.c', 'compositor/meta-background-content-private.h', 'compositor/meta-background.c',