[mutter] monitor: Add meta_monitor_get_gpu()
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor: Add meta_monitor_get_gpu()
- Date: Fri, 6 Oct 2017 18:25:46 +0000 (UTC)
commit 802f7dcd307cad41f49a397d1a284fb2bad2e3b0
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Jul 24 17:16:38 2017 +0800
monitor: Add meta_monitor_get_gpu()
Add API to get what GPU drives this monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=785381
src/backends/meta-monitor.c | 8 ++++++++
src/backends/meta-monitor.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index ee85044..50a545b 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -180,6 +180,14 @@ meta_monitor_generate_spec (MetaMonitor *monitor)
priv->spec = monitor_spec;
}
+MetaGpu *
+meta_monitor_get_gpu (MetaMonitor *monitor)
+{
+ MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
+
+ return priv->gpu;
+}
+
GList *
meta_monitor_get_outputs (MetaMonitor *monitor)
{
diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h
index 0026bb0..e11dfc2 100644
--- a/src/backends/meta-monitor.h
+++ b/src/backends/meta-monitor.h
@@ -101,6 +101,8 @@ MetaMonitorNormal * meta_monitor_normal_new (MetaGpu *gpu,
MetaMonitorSpec * meta_monitor_get_spec (MetaMonitor *monitor);
+MetaGpu * meta_monitor_get_gpu (MetaMonitor *monitor);
+
gboolean meta_monitor_is_active (MetaMonitor *monitor);
MetaOutput * meta_monitor_get_main_output (MetaMonitor *monitor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]