compositor: Add API to get feedback group

It already had, except it was accessed via the MetaDisplay.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
This commit is contained in:
Jonas Ådahl 2022-05-30 23:08:26 +02:00 committed by Robert Mader
parent 2731f0cda4
commit 4cc5e6d2bd
2 changed files with 21 additions and 5 deletions

View File

@ -266,6 +266,23 @@ meta_get_top_window_group_for_display (MetaDisplay *display)
return priv->top_window_group; return priv->top_window_group;
} }
/**
* meta_compositor_get_feedback_group:
* @compositor: a #MetaCompositor
*
* Returns: (transfer none): The feedback group corresponding to @display
*/
ClutterActor *
meta_compositor_get_feedback_group (MetaCompositor *compositor)
{
MetaCompositorPrivate *priv;
g_return_val_if_fail (compositor, NULL);
priv = meta_compositor_get_instance_private (compositor);
return priv->feedback_group;
}
/** /**
* meta_get_feedback_group_for_display: * meta_get_feedback_group_for_display:
* @display: a #MetaDisplay * @display: a #MetaDisplay
@ -276,15 +293,11 @@ ClutterActor *
meta_get_feedback_group_for_display (MetaDisplay *display) meta_get_feedback_group_for_display (MetaDisplay *display)
{ {
MetaCompositor *compositor; MetaCompositor *compositor;
MetaCompositorPrivate *priv;
g_return_val_if_fail (display, NULL); g_return_val_if_fail (display, NULL);
compositor = get_compositor_for_display (display); compositor = get_compositor_for_display (display);
g_return_val_if_fail (compositor, NULL); return meta_compositor_get_feedback_group (compositor);
priv = meta_compositor_get_instance_private (compositor);
return priv->feedback_group;
} }
/** /**

View File

@ -166,4 +166,7 @@ void meta_compositor_show_window_menu_for_rect (MetaCompositor *compositor,
META_EXPORT META_EXPORT
MetaLaters * meta_compositor_get_laters (MetaCompositor *compositor); MetaLaters * meta_compositor_get_laters (MetaCompositor *compositor);
META_EXPORT
ClutterActor * meta_compositor_get_feedback_group (MetaCompositor *compositor);
#endif /* META_COMPOSITOR_H */ #endif /* META_COMPOSITOR_H */