[mutter] workspace: Nag less about tiny but sane work areas



commit a0e4f5226c0d6b4358b040219c207689d5bf43f3
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Jan 29 10:06:18 2021 +0100

    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>

 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 32ee8da93a..321d3efb0a 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",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]