[metacity] compositor: remove unused move functions



commit e6ba1b7d0718f72710438c9e63c0b440379b81aa
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Mar 6 00:47:26 2017 +0200

    compositor: remove unused move functions

 src/compositor/meta-compositor-none.c    |   26 --------------------
 src/compositor/meta-compositor-private.h |   14 -----------
 src/compositor/meta-compositor-xrender.c |   26 --------------------
 src/compositor/meta-compositor.c         |   38 ------------------------------
 src/core/display.c                       |   14 -----------
 src/core/window.c                        |    5 ----
 src/include/meta-compositor.h            |   14 -----------
 7 files changed, 0 insertions(+), 137 deletions(-)
---
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c
index 5813cf3..9f84ec9 100644
--- a/src/compositor/meta-compositor-none.c
+++ b/src/compositor/meta-compositor-none.c
@@ -92,29 +92,6 @@ meta_compositor_none_set_active_window (MetaCompositor *compositor,
 }
 
 static void
-meta_compositor_none_begin_move (MetaCompositor *compositor,
-                                 MetaWindow     *window,
-                                 MetaRectangle  *initial,
-                                 gint            grab_x,
-                                 gint            grab_y)
-{
-}
-
-static void
-meta_compositor_none_update_move (MetaCompositor *compositor,
-                                  MetaWindow     *window,
-                                  gint            x,
-                                  gint            y)
-{
-}
-
-static void
-meta_compositor_none_end_move (MetaCompositor *compositor,
-                               MetaWindow     *window)
-{
-}
-
-static void
 meta_compositor_none_maximize_window (MetaCompositor *compositor,
                                       MetaWindow     *window)
 {
@@ -156,9 +133,6 @@ meta_compositor_none_class_init (MetaCompositorNoneClass *none_class)
   compositor_class->process_event = meta_compositor_none_process_event;
   compositor_class->get_window_surface = meta_compositor_none_get_window_surface;
   compositor_class->set_active_window = meta_compositor_none_set_active_window;
-  compositor_class->begin_move = meta_compositor_none_begin_move;
-  compositor_class->update_move = meta_compositor_none_update_move;
-  compositor_class->end_move = meta_compositor_none_end_move;
   compositor_class->maximize_window = meta_compositor_none_maximize_window;
   compositor_class->unmaximize_window = meta_compositor_none_unmaximize_window;
   compositor_class->sync_stack = meta_compositor_none_sync_stack;
diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h
index 8ade140..41b973e 100644
--- a/src/compositor/meta-compositor-private.h
+++ b/src/compositor/meta-compositor-private.h
@@ -60,20 +60,6 @@ struct _MetaCompositorClass
   void              (* set_active_window)  (MetaCompositor     *compositor,
                                             MetaWindow         *window);
 
-  void              (* begin_move)         (MetaCompositor     *compositor,
-                                            MetaWindow         *window,
-                                            MetaRectangle      *initial,
-                                            gint                grab_x,
-                                            gint                grab_y);
-
-  void              (* update_move)        (MetaCompositor     *compositor,
-                                            MetaWindow         *window,
-                                            gint                x,
-                                            gint                y);
-
-  void              (* end_move)           (MetaCompositor     *compositor,
-                                            MetaWindow         *window);
-
   void              (* maximize_window)    (MetaCompositor     *compositor,
                                             MetaWindow         *window);
 
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 890a4c7..9f13c1c 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -3335,29 +3335,6 @@ meta_compositor_xrender_set_active_window (MetaCompositor *compositor,
 }
 
 static void
-meta_compositor_xrender_begin_move (MetaCompositor *compositor,
-                                    MetaWindow     *window,
-                                    MetaRectangle  *initial,
-                                    gint            grab_x,
-                                    gint            grab_y)
-{
-}
-
-static void
-meta_compositor_xrender_update_move (MetaCompositor *compositor,
-                                     MetaWindow     *window,
-                                     gint            x,
-                                     gint            y)
-{
-}
-
-static void
-meta_compositor_xrender_end_move (MetaCompositor *compositor,
-                                  MetaWindow     *window)
-{
-}
-
-static void
 meta_compositor_xrender_maximize_window (MetaCompositor *compositor,
                                          MetaWindow     *window)
 {
@@ -3464,9 +3441,6 @@ meta_compositor_xrender_class_init (MetaCompositorXRenderClass *xrender_class)
   compositor_class->process_event = meta_compositor_xrender_process_event;
   compositor_class->get_window_surface = meta_compositor_xrender_get_window_surface;
   compositor_class->set_active_window = meta_compositor_xrender_set_active_window;
-  compositor_class->begin_move = meta_compositor_xrender_begin_move;
-  compositor_class->update_move = meta_compositor_xrender_update_move;
-  compositor_class->end_move = meta_compositor_xrender_end_move;
   compositor_class->maximize_window = meta_compositor_xrender_maximize_window;
   compositor_class->unmaximize_window = meta_compositor_xrender_unmaximize_window;
   compositor_class->sync_stack = meta_compositor_xrender_sync_stack;
diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c
index 29244d6..bcd29cd 100644
--- a/src/compositor/meta-compositor.c
+++ b/src/compositor/meta-compositor.c
@@ -288,44 +288,6 @@ meta_compositor_set_active_window (MetaCompositor *compositor,
 }
 
 void
-meta_compositor_begin_move (MetaCompositor *compositor,
-                            MetaWindow     *window,
-                            MetaRectangle  *initial,
-                            gint            grab_x,
-                            gint            grab_y)
-{
-  MetaCompositorClass *compositor_class;
-
-  compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
-
-  compositor_class->begin_move (compositor, window, initial, grab_x, grab_y);
-}
-
-void
-meta_compositor_update_move (MetaCompositor *compositor,
-                             MetaWindow     *window,
-                             gint            x,
-                             gint            y)
-{
-  MetaCompositorClass *compositor_class;
-
-  compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
-
-  compositor_class->update_move (compositor, window, x, y);
-}
-
-void
-meta_compositor_end_move (MetaCompositor *compositor,
-                          MetaWindow     *window)
-{
-  MetaCompositorClass *compositor_class;
-
-  compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
-
-  compositor_class->end_move (compositor, window);
-}
-
-void
 meta_compositor_maximize_window (MetaCompositor *compositor,
                                  MetaWindow     *window)
 {
diff --git a/src/core/display.c b/src/core/display.c
index df627dd..fa8b928 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -3552,13 +3552,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
   MetaWindow *grab_window = NULL;
   Window grab_xwindow;
 
-  if (meta_grab_op_is_mouse (op) && meta_grab_op_is_moving (op))
-    {
-      meta_compositor_begin_move (display->compositor,
-                                  window, &window->rect,
-                                  root_x, root_y);
-    }
-
   meta_topic (META_DEBUG_WINDOW_OPS,
               "Doing grab op %u on window %s button %d pointer already grabbed: %d pointer pos %d,%d\n",
               op, window ? window->desc : "none", button, pointer_already_grabbed,
@@ -3901,13 +3894,6 @@ meta_display_end_grab_op (MetaDisplay *display,
       meta_window_calc_showing (display->grab_window);
     }
 
-  if (display->grab_window &&
-      meta_grab_op_is_mouse (display->grab_op) &&
-      meta_grab_op_is_moving (display->grab_op))
-    {
-      meta_compositor_end_move (display->compositor, display->grab_window);
-    }
-
   if (display->grab_have_pointer)
     {
       meta_topic (META_DEBUG_WINDOW_OPS,
diff --git a/src/core/window.c b/src/core/window.c
index 3854a64..7fd7928 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7427,7 +7427,6 @@ update_move (MetaWindow  *window,
   MetaRectangle old;
   int shake_threshold;
   MetaDisplay *display = window->display;
-  int root_x, root_y;
 
   display->grab_latest_motion_x = x;
   display->grab_latest_motion_y = y;
@@ -7642,10 +7641,6 @@ update_move (MetaWindow  *window,
                                         snap,
                                         FALSE);
 
-  root_x = new_x - display->grab_anchor_window_pos.x + display->grab_anchor_root_x;
-  root_y = new_y - display->grab_anchor_window_pos.y + display->grab_anchor_root_y;
-  meta_compositor_update_move (display->compositor, window, root_x, root_y);
-
   if (display->grab_wireframe_active)
     meta_window_update_wireframe (window, new_x, new_y,
                                   display->grab_wireframe_rect.width,
diff --git a/src/include/meta-compositor.h b/src/include/meta-compositor.h
index 8d722db..bfdb429 100644
--- a/src/include/meta-compositor.h
+++ b/src/include/meta-compositor.h
@@ -77,20 +77,6 @@ cairo_surface_t *meta_compositor_get_window_surface (MetaCompositor     *composi
 void             meta_compositor_set_active_window  (MetaCompositor     *compositor,
                                                      MetaWindow         *window);
 
-void             meta_compositor_begin_move         (MetaCompositor     *compositor,
-                                                     MetaWindow         *window,
-                                                     MetaRectangle      *initial,
-                                                     gint                grab_x,
-                                                     gint                grab_y);
-
-void             meta_compositor_update_move        (MetaCompositor     *compositor,
-                                                     MetaWindow         *window,
-                                                     gint                x,
-                                                     gint                y);
-
-void             meta_compositor_end_move           (MetaCompositor     *compositor,
-                                                     MetaWindow         *window);
-
 void             meta_compositor_maximize_window    (MetaCompositor     *compositor,
                                                      MetaWindow         *window);
 


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