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



commit b5651e663920284243c3894e9579d0068402f6f5
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/1595>

 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 3516b8debd..2e37e9d593 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6313,7 +6313,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]