rpms/vte/devel vte-0.16.0-transparent.patch, NONE, 1.1 vte.spec, 1.104, 1.105

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Mar 26 23:54:56 UTC 2007


Author: mclasen

Update of /cvs/dist/rpms/vte/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1095

Modified Files:
	vte.spec 
Added Files:
	vte-0.16.0-transparent.patch 
Log Message:
fix transparency issues


vte-0.16.0-transparent.patch:
 vtedraw.c   |    4 ++--
 vtedraw.h   |    4 ++--
 vteft2.c    |    2 +-
 vtegl.c     |    2 +-
 vtepango.c  |    4 ++--
 vtepangox.c |    4 ++--
 vtexft.c    |    6 ++++--
 7 files changed, 14 insertions(+), 12 deletions(-)

--- NEW FILE vte-0.16.0-transparent.patch ---
Index: src/vteft2.c
===================================================================
--- src/vteft2.c	(revision 1834)
+++ src/vteft2.c	(working copy)
@@ -164,7 +164,7 @@
 		g_object_unref(data->pixbuf);
 	}
 	data->pixbuf = bgpixbuf;
-	draw->has_background_image = bgpixbuf != NULL;
+	draw->requires_clear = bgpixbuf != NULL;
 }
 
 static void
Index: src/vtexft.c
===================================================================
--- src/vtexft.c	(revision 1834)
+++ src/vtexft.c	(working copy)
@@ -479,6 +479,8 @@
 	data = (struct _vte_xft_data*) draw->impl_data;
 	data->color = *color;
 	data->opacity = opacity;
+	draw->requires_clear = data->opacity != 0xffff
+		|| (data->pixmapw > 0 && data->pixmaph > 0);
 }
 
 static void
@@ -505,13 +507,13 @@
 	if (data->pixmap != NULL) {
 		g_object_unref (data->pixmap);
 	}
-	draw->has_background_image = FALSE;
+	draw->requires_clear = data->opacity != 0xffff;
 	data->pixmap = NULL;
 	if (pixmap != NULL) {
 		data->pixmap = pixmap;
 		data->xpixmap = gdk_x11_drawable_get_xid (pixmap);
 		gdk_drawable_get_size (pixmap, &data->pixmapw, &data->pixmaph);
-		draw->has_background_image =
+		draw->requires_clear |=
 			data->pixmapw > 0 && data->pixmaph > 0;
 	}
 }
Index: src/vtegl.c
===================================================================
--- src/vtegl.c	(revision 1834)
+++ src/vtegl.c	(working copy)
@@ -152,6 +152,7 @@
 	data->buffer = _vte_buffer_new();
 
 	gtk_widget_set_double_buffered(widget, FALSE);
+	draw->requires_clear = TRUE;
 }
 
 static void
@@ -263,7 +264,6 @@
 		g_object_unref(data->bgpixbuf);
 	}
 	data->bgpixbuf = bgpixbuf;
-	draw->has_background_image = bgpixbuf != NULL;
 }
 
 static void
Index: src/vtedraw.c
===================================================================
--- src/vtedraw.c	(revision 1834)
+++ src/vtedraw.c	(working copy)
@@ -226,9 +226,9 @@
 }
 
 gboolean
-_vte_draw_has_background_image (struct _vte_draw *draw)
+_vte_draw_requires_clear (struct _vte_draw *draw)
 {
-	return draw->has_background_image;
+	return draw->requires_clear;
 }
 
 gboolean
Index: src/vtedraw.h
===================================================================
--- src/vtedraw.h	(revision 1834)
+++ src/vtedraw.h	(working copy)
@@ -100,7 +100,7 @@
 	GtkWidget *widget;
 	gboolean started;
 	gint width, height, ascent;
-	gboolean has_background_image;
+	gboolean requires_clear;
 	const struct _vte_draw_impl *impl;
 	gpointer impl_data;
 };
@@ -132,7 +132,7 @@
 				    const char *file,
 				    const GdkColor *color,
 				    double saturation);
-gboolean _vte_draw_has_background_image (struct _vte_draw *draw);
+gboolean _vte_draw_requires_clear (struct _vte_draw *draw);
 gboolean _vte_draw_requires_repaint(struct _vte_draw *draw);
 gboolean _vte_draw_clip(struct _vte_draw *draw, GdkRegion *region);
 void _vte_draw_clear(struct _vte_draw *draw,
Index: src/vtepangox.c
===================================================================
--- src/vtepangox.c	(revision 1834)
+++ src/vtepangox.c	(working copy)
@@ -208,13 +208,13 @@
 	if (data->pixmap != NULL) {
 		g_object_unref(data->pixmap);
 	}
-	draw->has_background_image = FALSE;
+	draw->requires_clear = FALSE;
 	data->pixmap = NULL;
 	data->pixmapw = data->pixmaph = 0;
 	if (pixmap != NULL) {
 		data->pixmap = pixmap;
 		gdk_drawable_get_size(pixmap, &data->pixmapw, &data->pixmaph);
-		draw->has_background_image =
+		draw->requires_clear =
 			data->pixmapw > 0 && data->pixmaph > 0;
 	}
 }
Index: src/vtepango.c
===================================================================
--- src/vtepango.c	(revision 1834)
+++ src/vtepango.c	(working copy)
@@ -175,13 +175,13 @@
 	if (data->pixmap != NULL) {
 		g_object_unref(data->pixmap);
 	}
-	draw->has_background_image = FALSE;
+	draw->requires_clear = FALSE;
 	data->pixmap = NULL;
 	data->pixmapw = data->pixmaph = 0;
 	if (pixmap) {
 		data->pixmap = pixmap;
 		gdk_drawable_get_size(pixmap, &data->pixmapw, &data->pixmaph);
-		draw->has_background_image =
+		draw->requires_clear =
 			data->pixmapw > 0 && data->pixmaph > 0;
 	}
 }


Index: vte.spec
===================================================================
RCS file: /cvs/dist/rpms/vte/devel/vte.spec,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- vte.spec	24 Mar 2007 05:13:15 -0000	1.104
+++ vte.spec	26 Mar 2007 23:54:54 -0000	1.105
@@ -1,12 +1,14 @@
 Name: vte
 Version: 0.16.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: A terminal emulator
 License: LGPL
 Group: User Interface/X
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 Source: ftp://ftp.gnome.org/pub/GNOME/sources/vte/0.15/%{name}-%{version}.tar.bz2
 Patch0: vte-0.16-redraw-race.patch
+# fixed in upstream svn
+Patch1: vte-0.16.0-transparent.patch
 BuildRequires: gtk2-devel, pygtk2-devel, python-devel, ncurses-devel
 BuildRequires: gettext
 BuildRequires: libXt-devel
@@ -31,6 +33,7 @@
 %prep
 %setup -q
 %patch0 -p0 -b .redraw-race
+%patch1 -p0 -b .transparent
 
 %build
 PYTHON=%{_bindir}/python`%{__python} -c "import sys ; print sys.version[:3]"`
@@ -103,6 +106,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Mon Mar 26 2007 Matthias Clasen <mclasen at redhat.com> 0.16.0-3
+- Add a patch to fix transparency (#232781)
+
 * Sat Mar 24 2007 Matthias Clasen <mclasen at redhat.com> 0.16.0-2
 - Add a patch to fix redraw problems
 




More information about the fedora-cvs-commits mailing list