monitor: Add API to check whether the monitor is virtual or not

As for the types of monitor, X11 and KMS are currently assumed to always be
physical, while the virtual ones are assumed to be virtual. In theory
X11 ones could be virtual, but lets not bother. KMS ones can be virtual
in the case of virtual KMS, but we typically use that for testing as if
it was physical, so lets leave it as such.

Will later be used to feed correct information to colord.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2141>
This commit is contained in:
Jonas Ådahl
2021-10-27 22:57:31 +02:00
committed by Marge Bot
parent f8dbea27f8
commit 972e393fc0
4 changed files with 15 additions and 0 deletions

View File

@ -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);