[mutter] window-wayland: Check to update the buffer_rect separately



commit 1de2fd7122bac69e7d45337a6ecabb47c87b3888
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jul 7 13:06:47 2014 -0400

    window-wayland: Check to update the buffer_rect separately
    
    When frame extents change, we might not update the frame rect, but the
    buffer rect still needs to be updated. Split out the check for this to
    be independent of the check for the frame rect.
    
    This fixes issues that could happen when the window was maximized while
    it was in the top-left corner.

 src/wayland/window-wayland.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index b29f209..5464812 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -219,7 +219,14 @@ meta_window_wayland_move_resize_internal (MetaWindow                *window,
           *result |= META_MOVE_RESIZE_RESULT_MOVED;
           window->rect.x = new_x;
           window->rect.y = new_y;
+        }
+
+      int new_buffer_x = new_x - window->custom_frame_extents.left;
+      int new_buffer_y = new_y - window->custom_frame_extents.top;
 
+      if (new_buffer_x != window->buffer_rect.x || new_buffer_y != window->buffer_rect.y)
+        {
+          *result |= META_MOVE_RESIZE_RESULT_MOVED;
           window->buffer_rect.x = new_x - window->custom_frame_extents.left;
           window->buffer_rect.y = new_y - window->custom_frame_extents.top;
         }


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