mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
tests/monitor-unit-tests: Only set suggested_x/y when relevant
It's used for two things: avoid reading configs, and actual hotplug update mode. The former requires the suggested position to be (-1, -1) to trick the monitor configuration generator to skip using the suggested position even if hotplug update mode is set to TRUE. The latter should use the actual hotplug mode coordinates. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
This commit is contained in:
parent
26ddb07066
commit
4920b5064d
@ -543,12 +543,6 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
|
|||||||
int i;
|
int i;
|
||||||
int n_laptop_panels = 0;
|
int n_laptop_panels = 0;
|
||||||
int n_normal_panels = 0;
|
int n_normal_panels = 0;
|
||||||
gboolean hotplug_mode_update;
|
|
||||||
|
|
||||||
if (flags & MONITOR_TEST_FLAG_NO_STORED)
|
|
||||||
hotplug_mode_update = TRUE;
|
|
||||||
else
|
|
||||||
hotplug_mode_update = FALSE;
|
|
||||||
|
|
||||||
test_setup = g_new0 (MetaMonitorTestSetup, 1);
|
test_setup = g_new0 (MetaMonitorTestSetup, 1);
|
||||||
|
|
||||||
@ -659,15 +653,16 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
|
|||||||
output_info->serial = g_strdup (serial);
|
output_info->serial = g_strdup (serial);
|
||||||
if (setup->outputs[i].hotplug_mode)
|
if (setup->outputs[i].hotplug_mode)
|
||||||
{
|
{
|
||||||
|
output_info->hotplug_mode_update = TRUE;
|
||||||
output_info->suggested_x = setup->outputs[i].suggested_x;
|
output_info->suggested_x = setup->outputs[i].suggested_x;
|
||||||
output_info->suggested_y = setup->outputs[i].suggested_y;
|
output_info->suggested_y = setup->outputs[i].suggested_y;
|
||||||
}
|
}
|
||||||
else
|
else if (flags & MONITOR_TEST_FLAG_NO_STORED)
|
||||||
{
|
{
|
||||||
|
output_info->hotplug_mode_update = TRUE;
|
||||||
output_info->suggested_x = -1;
|
output_info->suggested_x = -1;
|
||||||
output_info->suggested_y = -1;
|
output_info->suggested_y = -1;
|
||||||
}
|
}
|
||||||
output_info->hotplug_mode_update = hotplug_mode_update;
|
|
||||||
output_info->width_mm = setup->outputs[i].width_mm;
|
output_info->width_mm = setup->outputs[i].width_mm;
|
||||||
output_info->height_mm = setup->outputs[i].height_mm;
|
output_info->height_mm = setup->outputs[i].height_mm;
|
||||||
output_info->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
|
output_info->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
|
||||||
|
Loading…
Reference in New Issue
Block a user