[vte] Add some debug output to VteBg
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Add some debug output to VteBg
- Date: Sun, 11 Apr 2010 19:01:50 +0000 (UTC)
commit 17a7de4fb76205f92d6f9af7af9ba6e127eeb3b4
Author: Christian Persch <chpe gnome org>
Date: Sun Apr 11 20:51:56 2010 +0200
Add some debug output to VteBg
src/debug.c | 3 ++-
src/debug.h | 3 ++-
src/vtebg.c | 21 ++++++++++++---------
3 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/debug.c b/src/debug.c
index 2810087..54997b9 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -49,7 +49,8 @@ _vte_debug_init(void)
{ "draw", VTE_DEBUG_DRAW },
{ "ally", VTE_DEBUG_ALLY },
{ "pangocairo", VTE_DEBUG_PANGOCAIRO },
- { "widget-size", VTE_DEBUG_WIDGET_SIZE }
+ { "widget-size", VTE_DEBUG_WIDGET_SIZE },
+ { "bg", VTE_DEBUG_BG }
};
_vte_debug_flags = g_parse_debug_string (g_getenv("VTE_DEBUG"),
diff --git a/src/debug.h b/src/debug.h
index 77f8dce..eee72cb 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -49,7 +49,8 @@ typedef enum {
VTE_DEBUG_ALLY = 1 << 18,
VTE_DEBUG_ADJ = 1 << 19,
VTE_DEBUG_PANGOCAIRO = 1 << 20,
- VTE_DEBUG_WIDGET_SIZE = 1 << 21
+ VTE_DEBUG_WIDGET_SIZE = 1 << 21,
+ VTE_DEBUG_BG = 1 << 22
} VteDebugFlags;
void _vte_debug_init(void);
diff --git a/src/vtebg.c b/src/vtebg.c
index deb4e55..e68883f 100644
--- a/src/vtebg.c
+++ b/src/vtebg.c
@@ -123,8 +123,8 @@ vte_bg_root_surface(VteBg *bg)
DefaultVisualOfScreen(screen),
width, height);
- _vte_debug_print(VTE_DEBUG_MISC|VTE_DEBUG_EVENTS,
- "New root background image %dx%d\n", width, height);
+ _vte_debug_print(VTE_DEBUG_BG|VTE_DEBUG_EVENTS,
+ "VteBg new background image %dx%d\n", width, height);
out_pixmaps:
g_free(pixmaps);
@@ -177,14 +177,11 @@ vte_bg_root_filter(GdkXEvent *native, GdkEvent *event, gpointer data)
static void
vte_bg_finalize (GObject *obj)
{
- VteBg *bg;
-
- bg = VTE_BG (obj);
+ VteBg *bg = VTE_BG (obj);
+ VteBgPrivate *pvt = bg->pvt;
- if (bg->pvt->cache) {
- g_list_foreach (bg->pvt->cache, (GFunc)vte_bg_cache_item_free, NULL);
- g_list_free (bg->pvt->cache);
- }
+ g_list_foreach (pvt->cache, (GFunc)vte_bg_cache_item_free, NULL);
+ g_list_free (pvt->cache);
G_OBJECT_CLASS(vte_bg_parent_class)->finalize (obj);
}
@@ -271,6 +268,9 @@ vte_bg_colors_equal(const PangoColor *a, const PangoColor *b)
static void
vte_bg_cache_item_free(VteBgCacheItem *item)
{
+ _vte_debug_print(VTE_DEBUG_BG,
+ "VteBgCacheItem %p freed\n", item);
+
/* Clean up whatever is left in the structure. */
if (item->source_pixbuf != NULL) {
g_object_remove_weak_pointer(G_OBJECT(item->source_pixbuf),
@@ -313,6 +313,9 @@ static void item_surface_destroy_func(void *data)
{
VteBgCacheItem *item = data;
+ _vte_debug_print(VTE_DEBUG_BG,
+ "VteBgCacheItem %p surface destroyed\n", item);
+
item->surface = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]