[mutter/gnome-3-36] window: Fix size hints with CSD



commit 10c9416abaa356d5d0c126d258aa3d2913dbe90c
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Mon Nov 23 10:07:45 2020 +0100

    window: Fix size hints with CSD
    
    Commit 03c69ed8 ("Do not go past size hints on resize") was meant to
    ensure the size hints set by the client would be honored during resize,
    as going past those values could cause the window to move on resize.
    
    However, it did so by calling ensure_size_hints_satisfied() which works
    with the frame rect rather than the client rect. As a result, the
    minimum size enforced would end up being larger than expected with
    client-side decorations.
    
    Use meta_window_maybe_apply_size_hints() instead which automatically
    adjusts for client size.
    
    Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1542
    (cherry picked from commit 27131198c702d07b43e8bba2d1bf15ffef489ade)
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1598>

 src/core/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 7f18707cb1..706a2211a7 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6315,7 +6315,7 @@ update_resize (MetaWindow *window,
   else if (window->display->grab_op & META_GRAB_OP_WINDOW_DIR_NORTH)
     new_rect.height -= dy;
 
-  ensure_size_hints_satisfied (&new_rect, &window->size_hints);
+  meta_window_maybe_apply_size_hints (window, &new_rect);
 
   /* If we're waiting for a request for _NET_WM_SYNC_REQUEST, we'll
    * resize the window when the window responds, or when we time


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