rpms/vte/devel vte-0.16.3-preedit-crash.patch, NONE, 1.1 vte.spec, 1.110, 1.111

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Fri May 4 17:28:24 UTC 2007


Author: mclasen

Update of /cvs/extras/rpms/vte/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16193

Modified Files:
	vte.spec 
Added Files:
	vte-0.16.3-preedit-crash.patch 
Log Message:
Fix a gnome-terminal crash


vte-0.16.3-preedit-crash.patch:

--- NEW FILE vte-0.16.3-preedit-crash.patch ---
Index: src/vte.c
===================================================================
--- src/vte.c	(revision 1880)
+++ src/vte.c	(revision 1887)
@@ -9768,10 +9768,8 @@
 	VteTerminal *terminal;
 	VteScreen *screen;
 	struct vte_charcell *cell;
-	struct _vte_draw_text_request item, *items;
+	struct _vte_draw_text_request item;
 	int row, drow, col, columns;
-	char *preedit;
-	int preedit_cursor;
 	long width, height, ascent, descent, delta, cursor_width;
 	int i, len, fore, back, x, y;
 	gboolean blink, selected;
@@ -10017,8 +10015,6 @@
 		row = screen->cursor_current.row - delta;
 
 		/* Find out how many columns the pre-edit string takes up. */
-		preedit = terminal->pvt->im_preedit;
-		preedit_cursor = -1;
 		columns = vte_terminal_preedit_width(terminal, FALSE);
 		len = vte_terminal_preedit_length(terminal, FALSE);
 
@@ -10031,13 +10027,12 @@
 
 		/* Draw the preedit string, boxed. */
 		if (len > 0) {
+			struct _vte_draw_text_request *items;
+			const char *preedit = terminal->pvt->im_preedit;
+			int preedit_cursor;
+
 			items = g_new(struct _vte_draw_text_request, len);
-			preedit = terminal->pvt->im_preedit;
 			for (i = columns = 0; i < len; i++) {
-				if ((preedit - terminal->pvt->im_preedit) ==
-				    terminal->pvt->im_preedit_cursor) {
-					preedit_cursor = i;
-				}
 				items[i].c = g_utf8_get_char(preedit);
 				items[i].columns = _vte_iso2022_unichar_width(items[i].c);
 				items[i].x = (col + columns) * width;
@@ -10045,10 +10040,6 @@
 				columns += items[i].columns;
 				preedit = g_utf8_next_char(preedit);
 			}
-			if ((preedit - terminal->pvt->im_preedit) ==
-			    terminal->pvt->im_preedit_cursor) {
-				preedit_cursor = i;
-			}
 			_vte_draw_clear(terminal->pvt->draw,
 					col * width + VTE_PAD_WIDTH,
 					row * height + VTE_PAD_WIDTH,
@@ -10061,10 +10052,11 @@
 								terminal->pvt->im_preedit_attrs,
 								TRUE,
 								width, height);
-			if ((preedit_cursor >= 0) && (preedit_cursor < len)) {
+			preedit_cursor = terminal->pvt->im_preedit_cursor;
+			if (preedit_cursor >= 0 && preedit_cursor < len) {
 				/* Cursored letter in reverse. */
 				vte_terminal_draw_cells(terminal,
-							&items[terminal->pvt->im_preedit_cursor], 1,
+							&items[preedit_cursor], 1,
 							back, fore, TRUE, TRUE,
 							FALSE,
 							FALSE,


Index: vte.spec
===================================================================
RCS file: /cvs/extras/rpms/vte/devel/vte.spec,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- vte.spec	27 Apr 2007 07:33:11 -0000	1.110
+++ vte.spec	4 May 2007 17:27:48 -0000	1.111
@@ -1,11 +1,13 @@
 Name: vte
 Version: 0.16.3
-Release: 1%{?dist}
+Release: 2%{?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.16/%{name}-%{version}.tar.bz2
+# Fix from upstream for http://bugzilla.gnome.org/show_bug.cgi?id=433776
+Patch0: vte-0.16.3-preedit-crash.patch
 
 BuildRequires: gtk2-devel, pygtk2-devel, python-devel, ncurses-devel
 BuildRequires: gettext
@@ -30,6 +32,7 @@
 
 %prep
 %setup -q
+%patch0 -p0 -b .preedit-crash
 
 %build
 PYTHON=%{_bindir}/python`%{__python} -c "import sys ; print sys.version[:3]"`
@@ -101,6 +104,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Fri May  4 2007 Matthias Clasen <mclasen at redhat.com> 0.16.3-2
+- Fix a gnome-terminal crash with input methods
+
 * Tue Apr 27 2007 Behdad Esfahbod <besfahbo at redhat.com> 0.16.3-1
 - Update to 0.16.3
 




More information about the fedora-extras-commits mailing list