diff options
author | Elijah Newren <newren@gmail.com> | 2005-11-19 01:17:15 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-11-19 01:17:15 +0000 |
commit | 861f81961584b94d9af2cc67dd4c04b1accdfbca (patch) | |
tree | f5da26c359cc17d779e328de3cac195b3b12ca3b | |
parent | 4455df299c2e11a761c735e6e10daaa4ddc2ffdd (diff) | |
download | metacity-861f81961584b94d9af2cc67dd4c04b1accdfbca.tar.gz |
Uh, I was pretty sure I had tested the last patch. I must have forgotten
2005-11-18 Elijah Newren <newren@gmail.com>
Uh, I was pretty sure I had tested the last patch. I must have
forgotten the last part I added--the ConstraintFunc consolidation.
How embarrassing.
* src/constraints.c (do_all_constraints): fix up pointer
arithmetic and make it actually work
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/constraints.c | 18 |
2 files changed, 16 insertions, 11 deletions
@@ -1,5 +1,14 @@ 2005-11-18 Elijah Newren <newren@gmail.com> + Uh, I was pretty sure I had tested the last patch. I must have + forgotten the last part I added--the ConstraintFunc consolidation. + How embarrassing. + + * src/constraints.c (do_all_constraints): fix up pointer + arithmetic and make it actually work + +2005-11-18 Elijah Newren <newren@gmail.com> + Do the cleanups requested by Havoc in his review. * constraints-ideas.txt: Update for the recent changes diff --git a/src/constraints.c b/src/constraints.c index a4616b41..4e880280 100644 --- a/src/constraints.c +++ b/src/constraints.c @@ -219,18 +219,15 @@ do_all_constraints (MetaWindow *window, ConstraintPriority priority, gboolean check_only) { - const ConstraintFunc *constraint; - const char *constraint_name; - gboolean satisfied; - - constraint = &all_constraints[0].func; - constraint_name = all_constraints[0].name; + const Constraint *constraint; + gboolean satisfied; + constraint = &all_constraints[0]; satisfied = TRUE; - while (*constraint) + while (constraint->func != NULL) { satisfied = satisfied && - (*constraint) (window, info, priority, check_only); + (*constraint->func) (window, info, priority, check_only); if (!check_only) { @@ -239,18 +236,17 @@ do_all_constraints (MetaWindow *window, "info->current is %d,%d +%d,%d after %s\n", info->current.x, info->current.y, info->current.width, info->current.height, - constraint_name); + constraint->name); } else if (!satisfied) { /* Log which constraint was not satisfied */ meta_topic (META_DEBUG_GEOMETRY, "constraint %s not satisfied.\n", - constraint_name); + constraint->name); return FALSE; } ++constraint; - ++constraint_name; } return TRUE; |