kms/plane: Make get_primary_plane() actually get the primary plane
The plane was not type checked, so it retrieved whatever plane happened to come first. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
parent
249512b068
commit
6bda72e3eb
@ -466,8 +466,14 @@ meta_kms_update_get_primary_plane_assignment (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsPlaneAssignment *plane_assignment = l->data;
|
||||
|
||||
if (plane_assignment->crtc == crtc)
|
||||
return plane_assignment;
|
||||
if (meta_kms_plane_get_plane_type (plane_assignment->plane) !=
|
||||
META_KMS_PLANE_TYPE_PRIMARY)
|
||||
continue;
|
||||
|
||||
if (plane_assignment->crtc != crtc)
|
||||
continue;
|
||||
|
||||
return plane_assignment;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user