mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
parent
47a6725207
commit
a0e4f5226c
@ -887,7 +887,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
|||||||
|
|
||||||
/* Lots of paranoia checks, forcing work_area_screen to be sane */
|
/* Lots of paranoia checks, forcing work_area_screen to be sane */
|
||||||
#define MIN_SANE_AREA 100
|
#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; "
|
meta_warning ("struts occupy an unusually large percentage of the screen; "
|
||||||
"available remaining width = %d < %d",
|
"available remaining width = %d < %d",
|
||||||
@ -904,7 +905,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
|||||||
work_area.width += 2*amount;
|
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; "
|
meta_warning ("struts occupy an unusually large percentage of the screen; "
|
||||||
"available remaining height = %d < %d",
|
"available remaining height = %d < %d",
|
||||||
|
Loading…
Reference in New Issue
Block a user