diff --git a/src/backends/meta-renderer.c b/src/backends/meta-renderer.c index ceac7df57..ea93dc99e 100644 --- a/src/backends/meta-renderer.c +++ b/src/backends/meta-renderer.c @@ -94,6 +94,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) { diff --git a/src/backends/meta-renderer.h b/src/backends/meta-renderer.h index bf51b51ab..1c617214b 100644 --- a/src/backends/meta-renderer.h +++ b/src/backends/meta-renderer.h @@ -53,4 +53,7 @@ void meta_renderer_set_legacy_view (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 */