[mutter] window-wayland: Change the state on grab op transitions



commit 41880778b51b686cbab69ce5166a24a9b92df03e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue May 20 15:54:39 2014 -0400

    window-wayland: Change the state on grab op transitions
    
    This could affect the RESIZING state.

 src/wayland/window-wayland.c |   40 ++++++++++++++++++++++++++++++----------
 1 files changed, 30 insertions(+), 10 deletions(-)
---
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index bee1544..dd6eed9 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -119,6 +119,34 @@ meta_window_wayland_focus (MetaWindow *window,
 }
 
 static void
+surface_state_changed (MetaWindow *window)
+{
+  MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window);
+
+  meta_wayland_surface_configure_notify (window->surface,
+                                         wl_window->last_sent_width,
+                                         wl_window->last_sent_height);
+}
+
+static void
+meta_window_wayland_grab_op_began (MetaWindow *window,
+                                   MetaGrabOp  op)
+{
+  surface_state_changed (window);
+
+  META_WINDOW_CLASS (meta_window_wayland_parent_class)->grab_op_began (window, op);
+}
+
+static void
+meta_window_wayland_grab_op_ended (MetaWindow *window,
+                                   MetaGrabOp  op)
+{
+  surface_state_changed (window);
+
+  META_WINDOW_CLASS (meta_window_wayland_parent_class)->grab_op_ended (window, op);
+}
+
+static void
 meta_window_wayland_move_resize_internal (MetaWindow                *window,
                                           int                        gravity,
                                           MetaRectangle              requested_rect,
@@ -192,16 +220,6 @@ meta_window_wayland_move_resize_internal (MetaWindow                *window,
 }
 
 static void
-surface_state_changed (MetaWindow *window)
-{
-  MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window);
-
-  meta_wayland_surface_configure_notify (window->surface,
-                                         wl_window->last_sent_width,
-                                         wl_window->last_sent_height);
-}
-
-static void
 appears_focused_changed (GObject    *object,
                          GParamSpec *pspec,
                          gpointer    user_data)
@@ -236,6 +254,8 @@ meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
   window_class->delete = meta_window_wayland_delete;
   window_class->kill = meta_window_wayland_kill;
   window_class->focus = meta_window_wayland_focus;
+  window_class->grab_op_began = meta_window_wayland_grab_op_began;
+  window_class->grab_op_ended = meta_window_wayland_grab_op_ended;
   window_class->move_resize_internal = meta_window_wayland_move_resize_internal;
 }
 


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