From d69546902b78c320e0c8d8a73022f8fb9b820c3c Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 25 Jun 2009 16:37:43 -0400 Subject: [PATCH] Remove unused MetaCompositor functions Remove a number of functions that were either entirely unimplemented or had empty implementations for the Clutter-compositor. meta_compositor_begin_move() meta_compositor_update_move() meta_compositor_end_move() meta_compositor_set_active_window() meta_compositor_free_window() http://bugzilla.gnome.org/show_bug.cgi?id=581813 --- src/compositor/compositor.c | 38 ------------------------------------- src/core/display.c | 19 ------------------- src/core/window.c | 23 +--------------------- src/include/compositor.h | 17 ----------------- 4 files changed, 1 insertion(+), 96 deletions(-) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 6d32112cc..e23a5c1ac 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -2095,44 +2095,6 @@ meta_compositor_process_event (MetaCompositor *compositor, return FALSE; } -Pixmap -meta_compositor_get_window_pixmap (MetaCompositor *compositor, - MetaWindow *window) -{ - return None; -} - -void -meta_compositor_set_active_window (MetaCompositor *compositor, - MetaScreen *screen, - MetaWindow *window) -{ -} - -/* These functions are unused at the moment */ -void -meta_compositor_begin_move (MetaCompositor *compositor, - MetaWindow *window, - MetaRectangle *initial, - int grab_x, - int grab_y) -{ -} - -void -meta_compositor_update_move (MetaCompositor *compositor, - MetaWindow *window, - int x, - int y) -{ -} - -void -meta_compositor_end_move (MetaCompositor *compositor, - MetaWindow *window) -{ -} - void meta_compositor_map_window (MetaCompositor *compositor, MetaWindow *window) diff --git a/src/core/display.c b/src/core/display.c index 0a3fb445a..4ef8359a1 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -3343,16 +3343,6 @@ meta_display_begin_grab_op (MetaDisplay *display, { Window grab_xwindow; - if (grab_op_is_mouse (op) && meta_grab_op_is_moving (op)) - { - if (display->compositor) - { - 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, @@ -3646,15 +3636,6 @@ meta_display_end_grab_op (MetaDisplay *display, meta_window_calc_showing (display->grab_window); } - if (display->compositor && - display->grab_window && - 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 c1e464a3f..d290e4424 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1272,12 +1272,7 @@ meta_window_unmanage (MetaWindow *window, g_assert (window->display->grab_window != window); if (window->display->focus_window == window) - { - window->display->focus_window = NULL; - if (window->display->compositor) - meta_compositor_set_active_window (window->display->compositor, - window->screen, NULL); - } + window->display->focus_window = NULL; if (window->maximized_horizontally || window->maximized_vertically) unmaximize_window_before_freeing (window); @@ -5827,9 +5822,6 @@ meta_window_notify_focus (MetaWindow *window, "* Focus --> %s\n", window->desc); window->display->focus_window = window; window->has_focus = TRUE; - if (window->display->compositor) - meta_compositor_set_active_window (window->display->compositor, - window->screen, window); /* Move to the front of the focusing workspace's MRU list. * We should only be "removing" it from the MRU list if it's @@ -5917,10 +5909,6 @@ meta_window_notify_focus (MetaWindow *window, if (window->frame) meta_frame_queue_draw (window->frame); - if (window->display->compositor) - meta_compositor_set_active_window (window->display->compositor, - window->screen, NULL); - meta_error_trap_push (window->display); XUninstallColormap (window->display->xdisplay, window->colormap); @@ -7560,15 +7548,6 @@ update_move (MetaWindow *window, snap, FALSE); - if (display->compositor) - { - int root_x = new_x - display->grab_anchor_window_pos.x + display->grab_anchor_root_x; - int 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/compositor.h b/src/include/compositor.h index bcc0ebce8..37d3a1178 100644 --- a/src/include/compositor.h +++ b/src/include/compositor.h @@ -73,23 +73,6 @@ void meta_compositor_set_updates (MetaCompositor *compositor, gboolean meta_compositor_process_event (MetaCompositor *compositor, XEvent *event, MetaWindow *window); -Pixmap meta_compositor_get_window_pixmap (MetaCompositor *compositor, - MetaWindow *window); -void meta_compositor_set_active_window (MetaCompositor *compositor, - MetaScreen *screen, - MetaWindow *window); - -void meta_compositor_begin_move (MetaCompositor *compositor, - MetaWindow *window, - MetaRectangle *initial, - int grab_x, int grab_y); -void meta_compositor_update_move (MetaCompositor *compositor, - MetaWindow *window, - int x, int y); -void meta_compositor_end_move (MetaCompositor *compositor, - MetaWindow *window); -void meta_compositor_free_window (MetaCompositor *compositor, - MetaWindow *window); void meta_compositor_map_window (MetaCompositor *compositor,