monitor-manager: Fall back to minimum screen size of 640 x 480

When headless, we don't have any logical monitors to derive a screen
size from, but we can't set it to empty as that will cause issues with
the clutter stage, UI widget layout and other things. To avoid such
issues, just fall back to a 640 x 480 screen size when headless.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
This commit is contained in:
Jonas Ådahl
2017-04-12 14:15:33 +08:00
parent a119e58773
commit 0aa7405a2a
5 changed files with 12 additions and 10 deletions

View File

@ -276,9 +276,8 @@ meta_monitor_manager_test_apply_monitors_config (MetaMonitorManager *manage
if (!config)
{
/* The screen is made 1x1, as clutter stage used cannot be empty. */
manager->screen_width = 1;
manager->screen_height = 1;
manager->screen_width = META_MONITOR_MANAGER_MIN_SCREEN_WIDTH;
manager->screen_height = META_MONITOR_MANAGER_MIN_SCREEN_HEIGHT;
if (meta_is_stage_views_enabled ())
{

View File

@ -2563,9 +2563,8 @@ meta_test_monitor_no_outputs (void)
.n_outputs = 0,
.n_crtcs = 0,
.n_tiled_monitors = 0,
/* The screen is made 1x1, as clutter stage used cannot be empty. */
.screen_width = 1,
.screen_height = 1
.screen_width = META_MONITOR_MANAGER_MIN_SCREEN_WIDTH,
.screen_height = META_MONITOR_MANAGER_MIN_SCREEN_HEIGHT
}
};
MetaMonitorTestSetup *test_setup;