[metacity] window-props: stop lying about what client window sets or does not



commit 2ef3d9e2080fdfd0a8a65a0aa04781fa0496d272
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Oct 3 16:18:52 2022 +0300

    window-props: stop lying about what client window sets or does not
    
    We are calling meta_set_normal_hints from meta_window_new to
    initialize size_hints. Claiming that window sets minimum size to
    zero or that window did not set gravity is wrong and missleading.

 src/core/window-props.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 66e5903b..2acb2063 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -1213,8 +1213,8 @@ meta_set_normal_hints (MetaWindow *window,
     }
   else
     {
-      window->size_hints.min_width = 0;
-      window->size_hints.min_height = 0;
+      window->size_hints.min_width = 1;
+      window->size_hints.min_height = 1;
     }
 
   /* Get max size hints */
@@ -1274,10 +1274,14 @@ meta_set_normal_hints (MetaWindow *window,
     }
   else
     {
-      meta_topic (META_DEBUG_GEOMETRY,
-                  "Window %s doesn't set gravity, using NW\n",
-                  window->desc);
       window->size_hints.win_gravity = NorthWestGravity;
+
+      if (hints != NULL)
+        {
+          meta_topic (META_DEBUG_GEOMETRY,
+                      "Window %s doesn't set gravity, using NW\n",
+                      window->desc);
+        }
     }
 
   /*** Lots of sanity checking ***/


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