diff options
author | Thomas Thurman <tthurman@gnome.org> | 2008-07-13 05:27:13 +0000 |
---|---|---|
committer | Thomas James Alexander Thurman <tthurman@src.gnome.org> | 2008-07-13 05:27:13 +0000 |
commit | 24e63a0d2d1dd924026d7180f98784650044a718 (patch) | |
tree | 59ee1d3259628dcfde59dcac92cac93540e8c9b0 | |
parent | 6bf62be4d002ec6a623b2c6c00e795c4695664e1 (diff) | |
download | metacity-24e63a0d2d1dd924026d7180f98784650044a718.tar.gz |
Don't allocate memory for log messages unless we're logging.
2008-07-12 Thomas Thurman <tthurman@gnome.org>
* src/core/constraints.c (do_screen_and_xinerama_relative_constraints):
Don't allocate memory for log messages unless we're logging.
svn path=/trunk/; revision=3786
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/core/constraints.c | 15 |
2 files changed, 14 insertions, 6 deletions
@@ -1,5 +1,10 @@ 2008-07-12 Thomas Thurman <tthurman@gnome.org> + * src/core/constraints.c (do_screen_and_xinerama_relative_constraints): + Don't allocate memory for log messages unless we're logging. + +2008-07-12 Thomas Thurman <tthurman@gnome.org> + * src/core/group.c (meta_window_get_group): This function can now officially return NULL. * src/core/window.c (meta_window_same_application): Two windows can't diff --git a/src/core/constraints.c b/src/core/constraints.c index 54dc794a..a7601a77 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -1070,13 +1070,16 @@ do_screen_and_xinerama_relative_constraints ( MetaRectangle how_far_it_can_be_smushed, min_size, max_size; #ifdef WITH_VERBOSE_MODE - /* First, log some debugging information */ - char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)]; + if (meta_is_verbose ()) + { + /* First, log some debugging information */ + char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)]; - meta_topic (META_DEBUG_GEOMETRY, - "screen/xinerama constraint; region_spanning_rectangles: %s\n", - meta_rectangle_region_to_string (region_spanning_rectangles, ", ", - spanning_region)); + meta_topic (META_DEBUG_GEOMETRY, + "screen/xinerama constraint; region_spanning_rectangles: %s\n", + meta_rectangle_region_to_string (region_spanning_rectangles, ", ", + spanning_region)); + } #endif /* Determine whether constraint applies; exit if it doesn't */ |