diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2018-12-12 11:37:13 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2019-01-16 17:09:51 +0000 |
commit | bd97b11414467166b1dffcd82dd4b15b5fc1abe2 (patch) | |
tree | 4f5142ed92356cf9fd0516808ccb7a38cdb5cecb /src/backends/meta-renderer.c | |
parent | 0da0207eed385f82996a9c19c2b7f888de2c0bd7 (diff) | |
download | mutter-bd97b11414467166b1dffcd82dd4b15b5fc1abe2.tar.gz |
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
Diffstat (limited to 'src/backends/meta-renderer.c')
-rw-r--r-- | src/backends/meta-renderer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/backends/meta-renderer.c b/src/backends/meta-renderer.c index 85d3984ed..28637437b 100644 --- a/src/backends/meta-renderer.c +++ b/src/backends/meta-renderer.c @@ -142,6 +142,24 @@ meta_renderer_get_views (MetaRenderer *renderer) 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 meta_renderer_finalize (GObject *object) { |