From a0e4f5226c0d6b4358b040219c207689d5bf43f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 29 Jan 2021 10:06:18 +0100 Subject: [PATCH] workspace: Nag less about tiny but sane work areas It's useful to be able to have very very tiny monitors (e.g. 60x60 pixels) when doing reference testing, as tests have reference images that the output is compared to. Smaller reference images the less storage they use. To avoid annoying pointless warnings when this is done, change the pedantic workspace work area code to be more forgiving if the work area happens to match the display size. Part-of: --- src/core/workspace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/workspace.c b/src/core/workspace.c index 32ee8da93..321d3efb0 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -887,7 +887,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace) /* Lots of paranoia checks, forcing work_area_screen to be sane */ #define MIN_SANE_AREA 100 - if (work_area.width < MIN_SANE_AREA) + if (work_area.width < MIN_SANE_AREA && + work_area.width != display_rect.width) { meta_warning ("struts occupy an unusually large percentage of the screen; " "available remaining width = %d < %d", @@ -904,7 +905,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace) work_area.width += 2*amount; } } - if (work_area.height < MIN_SANE_AREA) + if (work_area.height < MIN_SANE_AREA && + work_area.height != display_rect.height) { meta_warning ("struts occupy an unusually large percentage of the screen; " "available remaining height = %d < %d",