monitor: Check hotplug update mode before getting suggested x/y

Without it being TRUE, the suggested x/y has no meaning.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
This commit is contained in:
Jonas Ådahl 2020-02-26 16:44:28 +01:00 committed by Georges Basile Stavracas Neto
parent 6697b0d069
commit 574b49ed95

View File

@ -716,6 +716,9 @@ meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
const MetaOutputInfo *output_info =
meta_monitor_get_main_output_info (monitor);
if (!output_info->hotplug_mode_update)
return FALSE;
if (output_info->suggested_x < 0 && output_info->suggested_y < 0)
return FALSE;