diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c index 0dca085ea..96e2b1aa6 100644 --- a/src/backends/meta-monitor.c +++ b/src/backends/meta-monitor.c @@ -386,6 +386,15 @@ meta_monitor_is_laptop_panel (MetaMonitor *monitor) } } +gboolean +meta_monitor_is_virtual (MetaMonitor *monitor) +{ + const MetaOutputInfo *output_info = + meta_monitor_get_main_output_info (monitor); + + return output_info->is_virtual; +} + gboolean meta_monitor_is_same_as (MetaMonitor *monitor, MetaMonitor *other_monitor) diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h index 17c4ff3b3..5d924b07b 100644 --- a/src/backends/meta-monitor.h +++ b/src/backends/meta-monitor.h @@ -123,6 +123,8 @@ gboolean meta_monitor_get_max_bpc (MetaMonitor *monitor, gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor); +gboolean meta_monitor_is_virtual (MetaMonitor *monitor); + gboolean meta_monitor_is_same_as (MetaMonitor *monitor, MetaMonitor *other_monitor); diff --git a/src/backends/meta-output.h b/src/backends/meta-output.h index 02ec0fa09..f87a625e6 100644 --- a/src/backends/meta-output.h +++ b/src/backends/meta-output.h @@ -80,6 +80,8 @@ typedef struct _MetaOutputInfo { grefcount ref_count; + gboolean is_virtual; + char *name; char *vendor; char *product; diff --git a/src/backends/native/meta-output-virtual.c b/src/backends/native/meta-output-virtual.c index 12efb3338..d276d3c6e 100644 --- a/src/backends/native/meta-output-virtual.c +++ b/src/backends/native/meta-output-virtual.c @@ -45,6 +45,8 @@ meta_output_virtual_new (uint64_t id, output_info = meta_output_info_new (); output_info->name = g_strdup_printf ("Meta-%" G_GUINT64_FORMAT, id); + output_info->is_virtual = TRUE; + output_info->n_possible_crtcs = 1; output_info->possible_crtcs = g_new0 (MetaCrtc *, 1); output_info->possible_crtcs[0] = META_CRTC (crtc_virtual);