summaryrefslogtreecommitdiff
path: root/src/core/constraints.c
diff options
context:
space:
mode:
authorJoaquín Ignacio Aramendía <[email protected]>2014-06-25 19:06:17 -0300
committerJoaquín Ignacio Aramendía <[email protected]>2014-06-26 20:03:32 -0300
commita65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch)
treeb451afa6025e587f0ee287601427e572712e3428 /src/core/constraints.c
parent32050fd47713d9254e05344a6afd87202fa45d11 (diff)
downloadmarco-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/constraints.c')
-rw-r--r--src/core/constraints.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c
index 1b2b70ab..4ac73ac5 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -43,7 +43,7 @@
// "constrain_whatever".
// 3) Add your function to the all_constraints and all_constraint_names
// arrays (the latter of which is for debugging purposes)
- //
+ //
// An example constraint function, constrain_whatever:
//
// /* constrain_whatever does the following:
@@ -249,7 +249,7 @@ do_all_constraints (MetaWindow *window,
/* Log how the constraint modified the position */
meta_topic (META_DEBUG_GEOMETRY,
"info->current is %d,%d +%d,%d after %s\n",
- info->current.x, info->current.y,
+ info->current.x, info->current.y,
info->current.width, info->current.height,
constraint->name);
}
@@ -291,8 +291,8 @@ meta_window_constrain (MetaWindow *window,
new->x, new->y, new->width, new->height);
setup_constraint_info (&info,
- window,
- orig_fgeom,
+ window,
+ orig_fgeom,
flags,
resize_gravity,
orig,
@@ -305,7 +305,7 @@ meta_window_constrain (MetaWindow *window,
/* Individually enforce all the high-enough priority constraints */
do_all_constraints (window, &info, priority, !check_only);
- /* Check if all high-enough priority constraints are simultaneously
+ /* Check if all high-enough priority constraints are simultaneously
* satisfied
*/
satisfied = do_all_constraints (window, &info, priority, check_only);
@@ -422,10 +422,10 @@ setup_constraint_info (ConstraintInfo *info,
}
cur_workspace = window->screen->active_workspace;
- info->usable_screen_region =
+ info->usable_screen_region =
meta_workspace_get_onscreen_region (cur_workspace);
- info->usable_xinerama_region =
- meta_workspace_get_onxinerama_region (cur_workspace,
+ info->usable_xinerama_region =
+ meta_workspace_get_onxinerama_region (cur_workspace,
xinerama_info->number);
/* Workaround braindead legacy apps that don't know how to
@@ -465,7 +465,7 @@ setup_constraint_info (ConstraintInfo *info,
" work_area_xinerama: %d,%d +%d,%d\n"
" entire_xinerama : %d,%d +%d,%d\n",
info->orig.x, info->orig.y, info->orig.width, info->orig.height,
- info->current.x, info->current.y,
+ info->current.x, info->current.y,
info->current.width, info->current.height,
info->fgeom->left_width, info->fgeom->right_width,
info->fgeom->top_height, info->fgeom->bottom_height,
@@ -480,7 +480,7 @@ setup_constraint_info (ConstraintInfo *info,
(info->fixed_directions == FIXED_DIRECTION_Y) ? "Y fixed" :
"Freakin' Invalid Stupid",
info->work_area_xinerama.x, info->work_area_xinerama.y,
- info->work_area_xinerama.width,
+ info->work_area_xinerama.width,
info->work_area_xinerama.height,
info->entire_xinerama.x, info->entire_xinerama.y,
info->entire_xinerama.width, info->entire_xinerama.height);
@@ -523,8 +523,8 @@ place_window_if_needed(MetaWindow *window,
xinerama_info->number,
&info->work_area_xinerama);
cur_workspace = window->screen->active_workspace;
- info->usable_xinerama_region =
- meta_workspace_get_onxinerama_region (cur_workspace,
+ info->usable_xinerama_region =
+ meta_workspace_get_onxinerama_region (cur_workspace,
xinerama_info->number);
@@ -561,7 +561,7 @@ place_window_if_needed(MetaWindow *window,
if (window->maximize_horizontally_after_placement ||
window->maximize_vertically_after_placement)
- meta_window_maximize_internal (window,
+ meta_window_maximize_internal (window,
(window->maximize_horizontally_after_placement ?
META_MAXIMIZE_HORIZONTAL : 0 ) |
(window->maximize_vertically_after_placement ?
@@ -653,7 +653,7 @@ update_onscreen_requirements (MetaWindow *window,
if (old ^ window->require_on_single_xinerama)
meta_topic (META_DEBUG_GEOMETRY,
"require_on_single_xinerama for %s toggled to %s\n",
- window->desc,
+ window->desc,
window->require_on_single_xinerama ? "TRUE" : "FALSE");
/* Update whether we want future constraint runs to require the
@@ -914,7 +914,7 @@ constrain_size_increments (MetaWindow *window,
return TRUE;
/* Determine whether constraint applies; exit if it doesn't */
- if (META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
+ if (META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
META_WINDOW_TILED (window) || info->action_type == ACTION_MOVE)
return TRUE;
@@ -931,7 +931,7 @@ constrain_size_increments (MetaWindow *window,
if (window->maximized_vertically)
extra_height *= 0;
/* constraint is satisfied iff there is no extra height or width */
- constraint_already_satisfied =
+ constraint_already_satisfied =
(extra_height == 0 && extra_width == 0);
if (check_only || constraint_already_satisfied)
@@ -957,10 +957,10 @@ constrain_size_increments (MetaWindow *window,
start_rect = &info->current;
else
start_rect = &info->orig;
-
+
/* Resize to the new size */
meta_rectangle_resize_with_gravity (start_rect,
- &info->current,
+ &info->current,
info->resize_gravity,
new_width,
new_height);
@@ -1005,7 +1005,7 @@ constrain_size_limits (MetaWindow *window,
/*** Enforce constraint ***/
new_width = CLAMP (info->current.width, min_size.width, max_size.width);
new_height = CLAMP (info->current.height, min_size.height, max_size.height);
-
+
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
* See bug 448183
*/
@@ -1013,9 +1013,9 @@ constrain_size_limits (MetaWindow *window,
start_rect = &info->current;
else
start_rect = &info->orig;
-
+
meta_rectangle_resize_with_gravity (start_rect,
- &info->current,
+ &info->current,
info->resize_gravity,
new_width,
new_height);
@@ -1045,7 +1045,7 @@ constrain_aspect_ratio (MetaWindow *window,
(double)window->size_hints.max_aspect.y;
constraints_are_inconsistent = minr > maxr;
if (constraints_are_inconsistent ||
- META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
+ META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
META_WINDOW_TILED (window) || info->action_type == ACTION_MOVE)
return TRUE;
@@ -1084,7 +1084,7 @@ constrain_aspect_ratio (MetaWindow *window,
fudge = 1;
break;
}
- constraint_already_satisfied =
+ constraint_already_satisfied =
info->current.width - (info->current.height * minr ) > -minr*fudge &&
info->current.width - (info->current.height * maxr ) < maxr*fudge;
if (check_only || constraint_already_satisfied)
@@ -1148,7 +1148,7 @@ constrain_aspect_ratio (MetaWindow *window,
start_rect = &info->orig;
meta_rectangle_resize_with_gravity (start_rect,
- &info->current,
+ &info->current,
info->resize_gravity,
new_width,
new_height);
@@ -1197,7 +1197,7 @@ do_screen_and_xinerama_relative_constraints (
exit_early = TRUE;
/* Determine whether constraint is already satisfied; exit if it is */
- constraint_satisfied =
+ constraint_satisfied =
meta_rectangle_contained_in_region (region_spanning_rectangles,
&info->current);
if (exit_early || constraint_satisfied || check_only)
@@ -1240,7 +1240,7 @@ constrain_to_single_xinerama (MetaWindow *window,
return TRUE;
/* Exit early if we know the constraint won't apply--note that this constraint
- * is only meant for normal windows (e.g. we don't want docks to be shoved
+ * is only meant for normal windows (e.g. we don't want docks to be shoved
* "onscreen" by their own strut) and we can't apply it to frameless windows
* or else users will be unable to move windows such as XMMS across xineramas.
*/
@@ -1253,7 +1253,7 @@ constrain_to_single_xinerama (MetaWindow *window,
return TRUE;
/* Have a helper function handle the constraint for us */
- return do_screen_and_xinerama_relative_constraints (window,
+ return do_screen_and_xinerama_relative_constraints (window,
info->usable_xinerama_region,
info,
check_only);
@@ -1269,18 +1269,18 @@ constrain_fully_onscreen (MetaWindow *window,
return TRUE;
/* Exit early if we know the constraint won't apply--note that this constraint
- * is only meant for normal windows (e.g. we don't want docks to be shoved
+ * is only meant for normal windows (e.g. we don't want docks to be shoved
* "onscreen" by their own strut).
*/
if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK ||
window->fullscreen ||
- !window->require_fully_onscreen ||
+ !window->require_fully_onscreen ||
info->is_user_action)
return TRUE;
/* Have a helper function handle the constraint for us */
- return do_screen_and_xinerama_relative_constraints (window,
+ return do_screen_and_xinerama_relative_constraints (window,
info->usable_screen_region,
info,
check_only);
@@ -1308,7 +1308,7 @@ constrain_titlebar_visible (MetaWindow *window,
info->is_user_action && !window->display->grab_frame_action;
/* Exit early if we know the constraint won't apply--note that this constraint
- * is only meant for normal windows (e.g. we don't want docks to be shoved
+ * is only meant for normal windows (e.g. we don't want docks to be shoved
* "onscreen" by their own strut).
*/
if (window->type == META_WINDOW_DESKTOP ||
@@ -1350,13 +1350,13 @@ constrain_titlebar_visible (MetaWindow *window,
*/
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
horiz_amount_offscreen,
- horiz_amount_offscreen,
+ horiz_amount_offscreen,
0, /* Don't let titlebar off */
bottom_amount,
horiz_amount_onscreen,
vert_amount_onscreen);
retval =
- do_screen_and_xinerama_relative_constraints (window,
+ do_screen_and_xinerama_relative_constraints (window,
info->usable_screen_region,
info,
check_only);
@@ -1386,7 +1386,7 @@ constrain_partially_onscreen (MetaWindow *window,
return TRUE;
/* Exit early if we know the constraint won't apply--note that this constraint
- * is only meant for normal windows (e.g. we don't want docks to be shoved
+ * is only meant for normal windows (e.g. we don't want docks to be shoved
* "onscreen" by their own strut).
*/
if (window->type == META_WINDOW_DESKTOP ||
@@ -1425,13 +1425,13 @@ constrain_partially_onscreen (MetaWindow *window,
*/
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
horiz_amount_offscreen,
- horiz_amount_offscreen,
+ horiz_amount_offscreen,
top_amount,
bottom_amount,
horiz_amount_onscreen,
vert_amount_onscreen);
retval =
- do_screen_and_xinerama_relative_constraints (window,
+ do_screen_and_xinerama_relative_constraints (window,
info->usable_screen_region,
info,
check_only);