backends/native: Add fake cursor plane using impl_device's crtcs
Because `meta_kms_impl_device_simple_initable_init` is called in the middle of `meta_kms_device_new`, the crtcs list for `MetaKmsDevice` has not been populated yet. And thus the loop to detect missing cursor planes and create fake ones never iterated. But the crtcs list does already exist in `MetaKmsImplDevice` so iterate over that instead. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3264 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3676>
This commit is contained in:
parent
b620dbb188
commit
14e18de90d
@ -1832,7 +1832,6 @@ meta_kms_impl_device_simple_initable_init (GInitable *initable,
|
|||||||
MetaKmsImplDeviceSimple *impl_device_simple =
|
MetaKmsImplDeviceSimple *impl_device_simple =
|
||||||
META_KMS_IMPL_DEVICE_SIMPLE (initable);
|
META_KMS_IMPL_DEVICE_SIMPLE (initable);
|
||||||
MetaKmsImplDevice *impl_device = META_KMS_IMPL_DEVICE (impl_device_simple);
|
MetaKmsImplDevice *impl_device = META_KMS_IMPL_DEVICE (impl_device_simple);
|
||||||
MetaKmsDevice *device = meta_kms_impl_device_get_device (impl_device);
|
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
if (!initable_parent_iface->init (initable, cancellable, error))
|
if (!initable_parent_iface->init (initable, cancellable, error))
|
||||||
@ -1847,11 +1846,11 @@ meta_kms_impl_device_simple_initable_init (GInitable *initable,
|
|||||||
NULL,
|
NULL,
|
||||||
(GDestroyNotify) cached_mode_set_free);
|
(GDestroyNotify) cached_mode_set_free);
|
||||||
|
|
||||||
for (l = meta_kms_device_get_crtcs (device); l; l = l->next)
|
for (l = meta_kms_impl_device_peek_crtcs (impl_device); l; l = l->next)
|
||||||
{
|
{
|
||||||
MetaKmsCrtc *crtc = l->data;
|
MetaKmsCrtc *crtc = l->data;
|
||||||
|
|
||||||
if (meta_kms_device_has_cursor_plane_for (device, crtc))
|
if (meta_kms_impl_device_has_cursor_plane_for (impl_device, crtc))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
meta_topic (META_DEBUG_KMS,
|
meta_topic (META_DEBUG_KMS,
|
||||||
@ -1859,9 +1858,9 @@ meta_kms_impl_device_simple_initable_init (GInitable *initable,
|
|||||||
meta_kms_crtc_get_id (crtc),
|
meta_kms_crtc_get_id (crtc),
|
||||||
meta_kms_impl_device_get_path (impl_device));
|
meta_kms_impl_device_get_path (impl_device));
|
||||||
|
|
||||||
meta_kms_device_add_fake_plane_in_impl (device,
|
meta_kms_impl_device_add_fake_plane (impl_device,
|
||||||
META_KMS_PLANE_TYPE_CURSOR,
|
META_KMS_PLANE_TYPE_CURSOR,
|
||||||
crtc);
|
crtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_message ("Added device '%s' (%s) using non-atomic mode setting.",
|
g_message ("Added device '%s' (%s) using non-atomic mode setting.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user