mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 12:00:44 -05:00
renderer: Add API to get view from logical monitor
Will be used to get the view scale for a logical monitor, which is necessary for passing cursor sprites via PipeWire. https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
This commit is contained in:
parent
851954b7ed
commit
1d8384372a
@ -94,6 +94,24 @@ meta_renderer_get_views (MetaRenderer *renderer)
|
|||||||
return priv->views;
|
return priv->views;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaRendererView *
|
||||||
|
meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
|
||||||
|
MetaLogicalMonitor *logical_monitor)
|
||||||
|
{
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaRendererView *view = l->data;
|
||||||
|
|
||||||
|
if (meta_renderer_view_get_logical_monitor (view) ==
|
||||||
|
logical_monitor)
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_renderer_finalize (GObject *object)
|
meta_renderer_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
|
@ -53,4 +53,7 @@ void meta_renderer_set_legacy_view (MetaRenderer *renderer,
|
|||||||
|
|
||||||
GList * meta_renderer_get_views (MetaRenderer *renderer);
|
GList * meta_renderer_get_views (MetaRenderer *renderer);
|
||||||
|
|
||||||
|
MetaRendererView * meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
|
||||||
|
MetaLogicalMonitor *logical_monitor);
|
||||||
|
|
||||||
#endif /* META_RENDERER_H */
|
#endif /* META_RENDERER_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user