diff options
author | Joaquín Ignacio Aramendía <[email protected]> | 2014-06-25 19:06:17 -0300 |
---|---|---|
committer | Joaquín Ignacio Aramendía <[email protected]> | 2014-06-26 20:03:32 -0300 |
commit | a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch) | |
tree | b451afa6025e587f0ee287601427e572712e3428 /src/core/edge-resistance.c | |
parent | 32050fd47713d9254e05344a6afd87202fa45d11 (diff) | |
download | marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.bz2 marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.xz |
Remove all trailing whitespaces in the code tree
Just run:
$ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
$ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
Diffstat (limited to 'src/core/edge-resistance.c')
-rw-r--r-- | src/core/edge-resistance.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/core/edge-resistance.c b/src/core/edge-resistance.c index 6ac10ee2..51e77d54 100644 --- a/src/core/edge-resistance.c +++ b/src/core/edge-resistance.c @@ -2,9 +2,9 @@ /* Edge resistance for move/resize operations */ -/* +/* * Copyright (C) 2005, 2006 Elijah Newren - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the @@ -14,7 +14,7 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA @@ -246,8 +246,8 @@ find_nearest_position (const GArray *edges, { edge = g_array_index (edges, MetaEdge*, i); compare = horizontal ? edge->rect.x : edge->rect.y; - - edges_align = horizontal ? + + edges_align = horizontal ? meta_rectangle_vert_overlap (&edge->rect, new_rect) : meta_rectangle_horiz_overlap (&edge->rect, new_rect); @@ -270,8 +270,8 @@ find_nearest_position (const GArray *edges, { edge = g_array_index (edges, MetaEdge*, i); compare = horizontal ? edge->rect.x : edge->rect.y; - - edges_align = horizontal ? + + edges_align = horizontal ? meta_rectangle_vert_overlap (&edge->rect, new_rect) : meta_rectangle_horiz_overlap (&edge->rect, new_rect); @@ -434,7 +434,7 @@ apply_edge_resistance (MetaWindow *window, if (!resistance_data->timeout_setup && timeout_length_ms != 0) { - resistance_data->timeout_id = + resistance_data->timeout_id = g_timeout_add (timeout_length_ms, edge_resistance_timeout, resistance_data); @@ -535,7 +535,7 @@ apply_edge_snapping (int old_pos, * display->grab_edge_resistance_data MUST already be setup or calling this * function will cause a crash. */ -static gboolean +static gboolean apply_edge_resistance_to_each_side (MetaDisplay *display, MetaWindow *window, const MetaRectangle *old_outer, @@ -655,7 +655,7 @@ apply_edge_resistance_to_each_side (MetaDisplay *display, } /* Determine whether anything changed, and save the changes */ - modified_rect = meta_rect (new_left, + modified_rect = meta_rect (new_left, new_top, new_right - new_left, new_bottom - new_top); @@ -750,7 +750,7 @@ meta_display_cleanup_edges (MetaDisplay *display) } static int -stupid_sort_requiring_extra_pointer_dereference (gconstpointer a, +stupid_sort_requiring_extra_pointer_dereference (gconstpointer a, gconstpointer b) { const MetaEdge * const *a_edge = a; @@ -775,7 +775,7 @@ cache_edges (MetaDisplay *display, #ifdef WITH_VERBOSE_MODE if (meta_is_verbose()) { - int max_edges = MAX (MAX( g_list_length (window_edges), + int max_edges = MAX (MAX( g_list_length (window_edges), g_list_length (xinerama_edges)), g_list_length (screen_edges)); char big_buffer[(EDGE_LENGTH+2)*max_edges]; @@ -912,13 +912,13 @@ cache_edges (MetaDisplay *display, * avoided this sort by sticking them into the array with some simple * merging of the lists). */ - g_array_sort (display->grab_edge_resistance_data->left_edges, + g_array_sort (display->grab_edge_resistance_data->left_edges, stupid_sort_requiring_extra_pointer_dereference); - g_array_sort (display->grab_edge_resistance_data->right_edges, + g_array_sort (display->grab_edge_resistance_data->right_edges, stupid_sort_requiring_extra_pointer_dereference); - g_array_sort (display->grab_edge_resistance_data->top_edges, + g_array_sort (display->grab_edge_resistance_data->top_edges, stupid_sort_requiring_extra_pointer_dereference); - g_array_sort (display->grab_edge_resistance_data->bottom_edges, + g_array_sort (display->grab_edge_resistance_data->bottom_edges, stupid_sort_requiring_extra_pointer_dereference); } @@ -955,7 +955,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) /* * 1st: Get the list of relevant windows, from bottom to top */ - stacked_windows = + stacked_windows = meta_stack_list_windows (display->grab_screen->stack, display->grab_screen->active_workspace); @@ -977,7 +977,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) new_rect = g_new (MetaRectangle, 1); meta_window_get_outer_rect (cur_window, new_rect); obscuring_windows = g_slist_prepend (obscuring_windows, new_rect); - window_stacking = + window_stacking = g_slist_prepend (window_stacking, GINT_TO_POINTER (stack_position)); } @@ -1017,7 +1017,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) * is offscreen (we also don't care about parts of edges covered * by other windows or DOCKS, but that's handled below). */ - meta_rectangle_intersect (&cur_rect, + meta_rectangle_intersect (&cur_rect, &display->grab_screen->rect, &reduced); @@ -1043,7 +1043,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) new_edge->side_type = META_SIDE_LEFT; new_edge->edge_type = META_EDGE_WINDOW; new_edges = g_list_prepend (new_edges, new_edge); - + /* Top side of this window is resistance for the bottom edge of * the window being moved. */ @@ -1068,7 +1068,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) /* Update the remaining windows to only those at a higher * stacking position than this one. */ - while (rem_win_stacking && + while (rem_win_stacking && stack_position >= GPOINTER_TO_INT (rem_win_stacking->data)) { rem_windows = rem_windows->next; @@ -1076,7 +1076,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) } /* Remove edge portions overlapped by rem_windows and rem_docks */ - new_edges = + new_edges = meta_rectangle_remove_intersections_with_boxes_from_edges ( new_edges, rem_windows); @@ -1098,7 +1098,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) /* FIXME: Shouldn't there be a helper function to make this one line of code * to free a list instead of four ugly ones? */ - g_slist_foreach (obscuring_windows, + g_slist_foreach (obscuring_windows, (void (*)(gpointer,gpointer))&g_free, /* ew, for ugly */ NULL); g_slist_free (obscuring_windows); @@ -1205,7 +1205,7 @@ meta_window_edge_resistance_for_move (MetaWindow *window, else smaller_y_change = bottom_change; - *new_x = old_x + smaller_x_change + + *new_x = old_x + smaller_x_change + (BOX_LEFT (*reference) - BOX_LEFT (old_outer)); *new_y = old_y + smaller_y_change + (BOX_TOP (*reference) - BOX_TOP (old_outer)); @@ -1249,7 +1249,7 @@ meta_window_edge_resistance_for_resize (MetaWindow *window, } proposed_outer_width = old_outer.width + (*new_width - old_width); proposed_outer_height = old_outer.height + (*new_height - old_height); - meta_rectangle_resize_with_gravity (&old_outer, + meta_rectangle_resize_with_gravity (&old_outer, &new_outer, gravity, proposed_outer_width, |