Fix segfaults on 32-bit systems.

The new "id" properties for the MetaCrtc* and MetaOuput* objects are 64-bit
values, so take care to pass 64-bit values when calling g_object_new.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1343.
This commit is contained in:
Martin Whitaker
2020-07-23 16:01:16 +01:00
committed by Jonas Ådahl
parent ac6990ef51
commit 7b79fcee45
7 changed files with 15 additions and 15 deletions

View File

@ -556,7 +556,7 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
crtc_mode_info->flags = setup->modes[i].flags;
mode = g_object_new (META_TYPE_CRTC_MODE,
"id", i,
"id", (uint64_t) i,
"info", crtc_mode_info,
NULL);
@ -569,7 +569,7 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
MetaCrtc *crtc;
crtc = g_object_new (META_TYPE_CRTC_TEST,
"id", i + 1,
"id", (uint64_t) i + 1,
"gpu", test_get_gpu (),
NULL);
@ -676,7 +676,7 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
setup->outputs[i].panel_orientation_transform;
output = g_object_new (META_TYPE_OUTPUT_TEST,
"id", i,
"id", (uint64_t) i,
"gpu", test_get_gpu (),
"info", output_info,
NULL);