mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
kms: Skip displays with 'non-desktop' property set
Detect displays marked as 'non-desktop' by the kernel and skip them when creating the outputs. Mutter is not able to render images that are shown properly on those devices anyway. This avoids lighting up attached VR HMDs and showing the GDM login screen between the eyes in a VR HMD instead of on the monitor. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1393
This commit is contained in:
parent
769997b0bc
commit
7564c2f2e4
@ -506,7 +506,7 @@ init_outputs (MetaGpuKms *gpu_kms)
|
||||
GError *error = NULL;
|
||||
|
||||
connector_state = meta_kms_connector_get_current_state (kms_connector);
|
||||
if (!connector_state)
|
||||
if (!connector_state || connector_state->non_desktop)
|
||||
continue;
|
||||
|
||||
old_output =
|
||||
|
@ -206,6 +206,9 @@ state_set_properties (MetaKmsConnectorState *state,
|
||||
else if ((prop->flags & DRM_MODE_PROP_ENUM) &&
|
||||
strcmp (prop->name, "panel orientation") == 0)
|
||||
set_panel_orientation (state, prop, drm_connector->prop_values[i]);
|
||||
if ((prop->flags & DRM_MODE_PROP_RANGE) &&
|
||||
strcmp (prop->name, "non-desktop") == 0)
|
||||
state->non_desktop = drm_connector->prop_values[i];
|
||||
|
||||
drmModeFreeProperty (prop);
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ typedef struct _MetaKmsConnectorState
|
||||
GBytes *edid_data;
|
||||
|
||||
gboolean has_scaling;
|
||||
gboolean non_desktop;
|
||||
|
||||
CoglSubpixelOrder subpixel_order;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user