diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-12-05 18:58:17 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-12-05 18:58:17 +0000 |
commit | 3411e97b89c09f3f692d73d2994dc52ffee8164b (patch) | |
tree | 2966899ceb177d1a9c53dbc373f8d4e53353c0cb | |
parent | 1862b94fbc5c02dde35c0450e939986e8a097710 (diff) | |
download | vte-3411e97b89c09f3f692d73d2994dc52ffee8164b.tar.gz |
Don't modify source_pixbuf. If we're going to change the saturation, first
* src/vtebg.c: (vte_bg_get_pixmap): Don't modify source_pixbuf. If
we're going to change the saturation, first make a copy. Fixes
switching background type between fauxtransparency and image in
gnome-terminal trunk.
svn path=/trunk/; revision=2333
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/vtebg.c | 10 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2008-12-05 Christian Persch <chpe@gnome.org> + + * src/vtebg.c: (vte_bg_get_pixmap): Don't modify source_pixbuf. If + we're going to change the saturation, first make a copy. Fixes + switching background type between fauxtransparency and image in + gnome-terminal trunk. + 2008-12-05 Behdad Esfahbod <behdad@gnome.org> * src/vtepangocairo.c (_vte_pangocairo_clear): Fix scrolling offset. diff --git a/src/vtebg.c b/src/vtebg.c index 1635d5ea..557ff8c9 100644 --- a/src/vtebg.c +++ b/src/vtebg.c @@ -619,9 +619,13 @@ vte_bg_get_pixmap(VteBg *bg, } break; case VTE_BG_SOURCE_PIXBUF: - pixbuf = source_pixbuf; - if (GDK_IS_PIXBUF(pixbuf)) { - g_object_ref(pixbuf); + if (GDK_IS_PIXBUF(source_pixbuf)) { + /* If we're going to modify the pixbuf below, make a copy first! */ + if (saturation != 1.0) { + pixbuf = gdk_pixbuf_copy(source_pixbuf); + } else { + pixbuf = g_object_ref(source_pixbuf); + } } break; case VTE_BG_SOURCE_FILE: |