Clean up debug features

Introduce a GTK_DEBUG_CHECK() macro and use it to check for
GTK_DEBUG flags everywhere. Also guard all such places by
This commit is contained in:
Matthias Clasen 2015-09-08 22:48:44 -04:00
parent 1b15588732
commit 3526b08e01
13 changed files with 107 additions and 72 deletions

View File

@ -752,7 +752,7 @@ _gtk_builder_construct (GtkBuilder *builder,
g_object_set_property (obj, param->name, &param->value); g_object_set_property (obj, param->name, &param->value);
#if G_ENABLE_DEBUG #if G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER) if (GTK_DEBUG_CHECK (BUILDER))
{ {
gchar *str = g_strdup_value_contents ((const GValue*)&param->value); gchar *str = g_strdup_value_contents ((const GValue*)&param->value);
g_print ("set %s: %s = %s\n", info->id, param->name, str); g_print ("set %s: %s = %s\n", info->id, param->name, str);
@ -816,7 +816,7 @@ _gtk_builder_apply_properties (GtkBuilder *builder,
g_object_set_property (info->object, param->name, &param->value); g_object_set_property (info->object, param->name, &param->value);
#if G_ENABLE_DEBUG #if G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER) if (GTK_DEBUG_CHECK (BUILDER))
{ {
gchar *str = g_strdup_value_contents ((const GValue*)&param->value); gchar *str = g_strdup_value_contents ((const GValue*)&param->value);
g_print ("set %s: %s = %s\n", info->id, param->name, str); g_print ("set %s: %s = %s\n", info->id, param->name, str);

View File

@ -926,7 +926,7 @@ start_element (GMarkupParseContext *context,
ParserData *data = (ParserData*)user_data; ParserData *data = (ParserData*)user_data;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_BUILDER) if (GTK_DEBUG_CHECK (BUILDER))
{ {
GString *tags = g_string_new (""); GString *tags = g_string_new ("");
int i; int i;

View File

@ -1265,8 +1265,10 @@ gtk_css_node_validate_internal (GtkCssNode *cssnode,
* Note that this also completely revalidates child widgets all * Note that this also completely revalidates child widgets all
* the time. * the time.
*/ */
if (G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_NO_CSS_CACHE)) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (NO_CSS_CACHE))
cssnode->pending_changes |= GTK_CSS_CHANGE_ANY; cssnode->pending_changes |= GTK_CSS_CHANGE_ANY;
#endif
if (!cssnode->invalid) if (!cssnode->invalid)
return; return;

View File

@ -59,12 +59,15 @@ typedef enum {
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
#define GTK_NOTE(type,action) G_STMT_START { \ #define GTK_DEBUG_CHECK(type) G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_##type)
if (gtk_get_debug_flags () & GTK_DEBUG_##type) \
#define GTK_NOTE(type,action) G_STMT_START { \
if (GTK_DEBUG_CHECK (type)) \
{ action; }; } G_STMT_END { action; }; } G_STMT_END
#else /* !G_ENABLE_DEBUG */ #else /* !G_ENABLE_DEBUG */
#define GTK_DEBUG_CHECK(type) 0
#define GTK_NOTE(type, action) #define GTK_NOTE(type, action)
#endif /* G_ENABLE_DEBUG */ #endif /* G_ENABLE_DEBUG */

View File

@ -122,8 +122,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
/* Verify cache is uptodate */ /* Verify cache is uptodate */
if (st.st_mtime < path_st.st_mtime) if (st.st_mtime < path_st.st_mtime)
{ {
GTK_NOTE (ICONTHEME, GTK_NOTE (ICONTHEME, g_print ("cache outdated\n"));
g_print ("cache outdated\n"));
goto done; goto done;
} }
@ -133,7 +132,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
goto done; goto done;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_ICONTHEME) if (GTK_DEBUG_CHECK (ICONTHEME))
{ {
CacheInfo info; CacheInfo info;

View File

@ -185,7 +185,7 @@ _gtk_pixel_cache_create_surface_if_needed (GtkPixelCache *cache,
double red, green, blue, alpha; double red, green, blue, alpha;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_NO_PIXEL_CACHE) if (GTK_DEBUG_CHECK (NO_PIXEL_CACHE))
return; return;
#endif #endif
@ -363,7 +363,7 @@ _gtk_pixel_cache_repaint (GtkPixelCache *cache,
cairo_restore (backing_cr); cairo_restore (backing_cr);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_PIXEL_CACHE) if (GTK_DEBUG_CHECK (PIXEL_CACHE))
{ {
GdkRGBA colors[] = { GdkRGBA colors[] = {
{ 1, 0, 0, 0.08}, { 1, 0, 0, 0.08},

View File

@ -491,7 +491,8 @@ gtk_print_job_get_surface (GtkPrintJob *job,
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
/* If we are debugging printing don't delete the tmp files */ /* If we are debugging printing don't delete the tmp files */
if (!(gtk_get_debug_flags () & GTK_DEBUG_PRINTING)) if (GTK_DEBUG_CHECK (PRINTING)) ;
else
#endif /* G_ENABLE_DEBUG */ #endif /* G_ENABLE_DEBUG */
g_unlink (filename); g_unlink (filename);
g_free (filename); g_free (filename);

View File

@ -74,7 +74,7 @@ static void
_gtk_rbnode_free (GtkRBNode *node) _gtk_rbnode_free (GtkRBNode *node)
{ {
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
node->left = (gpointer) 0xdeadbeef; node->left = (gpointer) 0xdeadbeef;
node->right = (gpointer) 0xdeadbeef; node->right = (gpointer) 0xdeadbeef;
@ -394,7 +394,7 @@ _gtk_rbtree_remove (GtkRBTree *tree)
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
GtkRBTree *tmp_tree; GtkRBTree *tmp_tree;
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
#endif #endif
@ -415,7 +415,7 @@ _gtk_rbtree_remove (GtkRBTree *tree)
_gtk_rbtree_free (tree); _gtk_rbtree_free (tree);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
_gtk_rbtree_test (G_STRLOC, tmp_tree); _gtk_rbtree_test (G_STRLOC, tmp_tree);
#endif #endif
} }
@ -431,13 +431,13 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
gboolean right = TRUE; gboolean right = TRUE;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("\n\n_gtk_rbtree_insert_after: %p\n", current); g_print ("\n\n_gtk_rbtree_insert_after: %p\n", current);
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
if (current != NULL && !_gtk_rbtree_is_nil (current->right)) if (current != NULL && !_gtk_rbtree_is_nil (current->right))
{ {
@ -476,14 +476,14 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
_gtk_rbtree_insert_fixup (tree, node); _gtk_rbtree_insert_fixup (tree, node);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("_gtk_rbtree_insert_after finished...\n"); g_print ("_gtk_rbtree_insert_after finished...\n");
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
g_print ("\n\n"); g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
return node; return node;
} }
@ -498,13 +498,13 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
gboolean left = TRUE; gboolean left = TRUE;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("\n\n_gtk_rbtree_insert_before: %p\n", current); g_print ("\n\n_gtk_rbtree_insert_before: %p\n", current);
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
if (current != NULL && !_gtk_rbtree_is_nil (current->left)) if (current != NULL && !_gtk_rbtree_is_nil (current->left))
{ {
@ -544,14 +544,14 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
_gtk_rbtree_insert_fixup (tree, node); _gtk_rbtree_insert_fixup (tree, node);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("_gtk_rbtree_insert_before finished...\n"); g_print ("_gtk_rbtree_insert_before finished...\n");
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
g_print ("\n\n"); g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
return node; return node;
} }
@ -591,7 +591,7 @@ _gtk_rbtree_node_set_height (GtkRBTree *tree,
gtk_rbnode_adjust (tree, node, 0, 0, diff); gtk_rbnode_adjust (tree, node, 0, 0, diff);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
#endif #endif
} }
@ -1117,13 +1117,13 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("\n\n_gtk_rbtree_remove_node: %p\n", node); g_print ("\n\n_gtk_rbtree_remove_node: %p\n", node);
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
/* make sure we're deleting a node that's actually in the tree */ /* make sure we're deleting a node that's actually in the tree */
for (x = node; !_gtk_rbtree_is_nil (x->parent); x = x->parent) for (x = node; !_gtk_rbtree_is_nil (x->parent); x = x->parent)
@ -1131,7 +1131,7 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
g_return_if_fail (x == tree->root); g_return_if_fail (x == tree->root);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
#endif #endif
@ -1227,14 +1227,14 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
_gtk_rbnode_free (node); _gtk_rbnode_free (node);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_print ("_gtk_rbtree_remove_node finished...\n"); g_print ("_gtk_rbtree_remove_node finished...\n");
_gtk_rbtree_debug_spew (tree); _gtk_rbtree_debug_spew (tree);
g_print ("\n\n"); g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree); _gtk_rbtree_test (G_STRLOC, tree);
} }
#endif /* G_ENABLE_DEBUG */ #endif
} }
GtkRBNode * GtkRBNode *

View File

@ -755,8 +755,10 @@ _gtk_text_btree_delete (GtkTextIter *start,
tree = _gtk_text_iter_get_btree (start); tree = _gtk_text_iter_get_btree (start);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
/* Broadcast the need for redisplay before we break the iterators */ /* Broadcast the need for redisplay before we break the iterators */
DV (g_print ("invalidating due to deleting some text (%s)\n", G_STRLOC)); DV (g_print ("invalidating due to deleting some text (%s)\n", G_STRLOC));
@ -1077,8 +1079,10 @@ _gtk_text_btree_delete (GtkTextIter *start,
chars_changed (tree); chars_changed (tree);
segments_changed (tree); segments_changed (tree);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
/* Re-initialize our iterators */ /* Re-initialize our iterators */
_gtk_text_btree_get_iter_at_line (tree, start, start_line, start_byte_offset); _gtk_text_btree_get_iter_at_line (tree, start, start_line, start_byte_offset);
@ -1359,8 +1363,10 @@ find_line_by_y (GtkTextBTree *tree, BTreeView *view,
{ {
gint current_y = 0; gint current_y = 0;
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
if (node->level == 0) if (node->level == 0)
{ {
@ -2011,8 +2017,10 @@ _gtk_text_btree_tag (const GtkTextIter *start_orig,
queue_tag_redisplay (tree, tag, &start, &end); queue_tag_redisplay (tree, tag, &start, &end);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
} }
@ -2736,8 +2744,10 @@ real_set_mark (GtkTextBTree *tree,
iter = *where; iter = *where;
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_iter_check (&iter); _gtk_text_iter_check (&iter);
#endif
if (mark != NULL) if (mark != NULL)
{ {
@ -2793,8 +2803,10 @@ real_set_mark (GtkTextBTree *tree,
mark); mark);
} }
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_iter_check (&iter); _gtk_text_iter_check (&iter);
#endif
/* Link mark into new location */ /* Link mark into new location */
gtk_text_btree_link_segment (mark, &iter); gtk_text_btree_link_segment (mark, &iter);
@ -2808,11 +2820,13 @@ real_set_mark (GtkTextBTree *tree,
redisplay_mark_if_visible (mark); redisplay_mark_if_visible (mark);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
_gtk_text_iter_check (&iter); if (GTK_DEBUG_CHECK (TEXT))
{
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) _gtk_text_iter_check (&iter);
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
}
#endif
return mark; return mark;
} }
@ -4329,8 +4343,10 @@ _gtk_text_line_next_could_contain_tag (GtkTextLine *line,
g_return_val_if_fail (line != NULL, NULL); g_return_val_if_fail (line != NULL, NULL);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
if (tag == NULL) if (tag == NULL)
{ {
@ -4492,8 +4508,10 @@ _gtk_text_line_previous_could_contain_tag (GtkTextLine *line,
g_return_val_if_fail (line != NULL, NULL); g_return_val_if_fail (line != NULL, NULL);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
if (tag == NULL) if (tag == NULL)
{ {
@ -5264,8 +5282,10 @@ _gtk_text_btree_validate (GtkTextBTree *tree,
if (new_height) if (new_height)
*new_height = state.new_height; *new_height = state.new_height;
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
return TRUE; return TRUE;
} }
@ -5973,8 +5993,10 @@ post_insert_fixup (GtkTextBTree *tree,
gtk_text_btree_rebalance (tree, node); gtk_text_btree_rebalance (tree, node);
} }
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
} }
static GtkTextTagInfo* static GtkTextTagInfo*
@ -6539,8 +6561,10 @@ gtk_text_btree_link_segment (GtkTextLineSegment *seg,
cleanup_line (line); cleanup_line (line);
segments_changed (tree); segments_changed (tree);
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_btree_check (tree); _gtk_text_btree_check (tree);
#endif
} }
static void static void
@ -6634,7 +6658,7 @@ _gtk_toggle_segment_check_func (GtkTextLineSegment *segPtr,
/* /*
* Debug * Debug
*/ */
#ifdef G_ENABLE_DEBUG
static void static void
gtk_text_btree_node_view_check_consistency (GtkTextBTree *tree, gtk_text_btree_node_view_check_consistency (GtkTextBTree *tree,
GtkTextBTreeNode *node, GtkTextBTreeNode *node,
@ -7081,6 +7105,7 @@ _gtk_text_btree_check (GtkTextBTree *tree)
seg->body.chars); seg->body.chars);
} }
} }
#endif /* G_ENABLE_DEBUG */
void _gtk_text_btree_spew_line (GtkTextBTree* tree, GtkTextLine* line); void _gtk_text_btree_spew_line (GtkTextBTree* tree, GtkTextLine* line);
void _gtk_text_btree_spew_segment (GtkTextBTree* tree, GtkTextLineSegment* seg); void _gtk_text_btree_spew_segment (GtkTextBTree* tree, GtkTextLineSegment* seg);

View File

@ -369,7 +369,7 @@ is_segment_start (GtkTextRealIter *real)
static void static void
check_invariants (const GtkTextIter *iter) check_invariants (const GtkTextIter *iter)
{ {
if (gtk_get_debug_flags () & GTK_DEBUG_TEXT) if (GTK_DEBUG_CHECK (TEXT))
_gtk_text_iter_check (iter); _gtk_text_iter_check (iter);
} }
#else #else

View File

@ -6042,8 +6042,10 @@ cursor_blinks (GtkTextView *text_view)
#ifdef DEBUG_VALIDATION_AND_SCROLLING #ifdef DEBUG_VALIDATION_AND_SCROLLING
return FALSE; return FALSE;
#endif #endif
if (gtk_get_debug_flags () & GTK_DEBUG_UPDATES) #ifdef G_ENABLE_DEBUG
if (GTK_DEBUG_CHECK (UPDATES))
return FALSE; return FALSE;
#endif
g_object_get (settings, "gtk-cursor-blink", &blink, NULL); g_object_get (settings, "gtk-cursor-blink", &blink, NULL);

View File

@ -192,16 +192,19 @@ static void gtk_tree_store_move (GtkTreeStore *
gboolean before); gboolean before);
#ifdef G_ENABLE_DEBUG
static inline void static inline void
validate_tree (GtkTreeStore *tree_store) validate_tree (GtkTreeStore *tree_store)
{ {
if (gtk_get_debug_flags () & GTK_DEBUG_TREE) if (GTK_DEBUG_CHECK (TREE))
{ {
g_assert (G_NODE (tree_store->priv->root)->parent == NULL); g_assert (G_NODE (tree_store->priv->root)->parent == NULL);
validate_gnode (G_NODE (tree_store->priv->root)); validate_gnode (G_NODE (tree_store->priv->root));
} }
} }
#else
#define validate_tree(store)
#endif
G_DEFINE_TYPE_WITH_CODE (GtkTreeStore, gtk_tree_store, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (GtkTreeStore, gtk_tree_store, G_TYPE_OBJECT,
G_ADD_PRIVATE (GtkTreeStore) G_ADD_PRIVATE (GtkTreeStore)

View File

@ -5839,7 +5839,7 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
gtk_widget_push_verify_invariants (widget); gtk_widget_push_verify_invariants (widget);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_GEOMETRY) if (GTK_DEBUG_CHECK (GEOMETRY))
{ {
gint depth; gint depth;
GtkWidget *parent; GtkWidget *parent;
@ -5901,7 +5901,7 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
} }
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_GEOMETRY) if (GTK_DEBUG_CHECK (GEOMETRY))
{ {
if ((min_width > real_allocation.width || min_height > real_allocation.height) && if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
!GTK_IS_SCROLLABLE (widget)) !GTK_IS_SCROLLABLE (widget))
@ -6845,7 +6845,7 @@ _gtk_widget_draw_internal (GtkWidget *widget,
&result); &result);
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_BASELINES)) if (GTK_DEBUG_CHECK (BASELINES))
{ {
gint baseline = gtk_widget_get_allocated_baseline (widget); gint baseline = gtk_widget_get_allocated_baseline (widget);
gint width = gtk_widget_get_allocated_width (widget); gint width = gtk_widget_get_allocated_width (widget);
@ -15584,7 +15584,7 @@ gtk_widget_set_clip (GtkWidget *widget,
priv = widget->priv; priv = widget->priv;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_GEOMETRY) if (GTK_DEBUG_CHECK (GEOMETRY))
{ {
gint depth; gint depth;
GtkWidget *parent; GtkWidget *parent;