rpms/xchat/F-7 xchat-2.8.4-shm-pixmaps.patch, 1.2, 1.3 xchat.spec, 1.77, 1.78

Kevin Kofler (kkofler) fedora-extras-commits at redhat.com
Sat Jan 19 06:15:36 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/xchat/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12759/F-7

Modified Files:
	xchat.spec 
Added Files:
	xchat-2.8.4-shm-pixmaps.patch 
Log Message:
Sync from devel:

* Sat Jan 19 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.8.4-11
- fix bug in xchat-2.8.4-shm-pixmaps.patch (Adam Jackson, #429218)

* Thu Jan  3 2008 Christopher Aillon <caillon at redhat.com> 1:2.8.4-10
- Rebuild

* Thu Dec 20 2007 Adam Jackson <ajax at redhat.com> 1:2.8.4-9
- xchat-2.8.4-shm-pixmaps.patch: MIT-SHM pixmaps are optional, and when
  using EXA they are not available.  Check that the server supports them
  before trying to create them so we don't crash.

xchat-2.8.4-shm-pixmaps.patch:

Index: xchat-2.8.4-shm-pixmaps.patch
===================================================================
RCS file: xchat-2.8.4-shm-pixmaps.patch
diff -N xchat-2.8.4-shm-pixmaps.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ xchat-2.8.4-shm-pixmaps.patch	19 Jan 2008 06:14:34 -0000	1.3
@@ -0,0 +1,56 @@
+diff -up xchat-2.8.4/src/fe-gtk/xtext.c.jx xchat-2.8.4/src/fe-gtk/xtext.c
+--- xchat-2.8.4/src/fe-gtk/xtext.c.jx	2007-06-08 05:57:07.000000000 -0400
++++ xchat-2.8.4/src/fe-gtk/xtext.c	2007-12-20 17:12:52.000000000 -0500
+@@ -3537,6 +3537,22 @@ get_image (GtkXText *xtext, Display *xdi
+ 
+ #endif
+ 
++#ifdef USE_SHM
++static int
++have_shm_pixmaps(Display *dpy)
++{
++    static int checked = 0, major, minor;
++    static Bool have = FALSE;
++
++    if (!checked) {
++	XShmQueryVersion(dpy, &major, &minor, &have);
++	checked = 1;
++    }
++
++    return have;
++}
++#endif
++
+ static GdkPixmap *
+ shade_pixmap (GtkXText * xtext, Pixmap p, int x, int y, int w, int h)
+ {
+@@ -3549,6 +3565,11 @@ shade_pixmap (GtkXText * xtext, Pixmap p
+ 	GC tgc;
+ 	Display *xdisplay = GDK_WINDOW_XDISPLAY (xtext->draw_buf);
+ 
++#ifdef USE_SHM
++	int shm_pixmaps;
++	shm_pixmaps = have_shm_pixmaps(xdisplay);
++#endif
++
+ 	XGetGeometry (xdisplay, p, &root, &dummy, &dummy, &width, &height,
+ 					  &dummy, &depth);
+ 
+@@ -3602,7 +3623,7 @@ shade_pixmap (GtkXText * xtext, Pixmap p
+ 	else
+ 	{
+ #ifdef USE_SHM
+-		if (xtext->shm)
++		if (xtext->shm && shm_pixmaps)
+ 		{
+ #if (GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION == 0)
+ 			shaded_pix = gdk_pixmap_foreign_new (
+@@ -3620,7 +3641,7 @@ shade_pixmap (GtkXText * xtext, Pixmap p
+ 	}
+ 
+ #ifdef USE_SHM
+-	if (!xtext->shm)
++	if (!xtext->shm || !shm_pixmaps)
+ #endif
+ 		XPutImage (xdisplay, GDK_WINDOW_XWINDOW (shaded_pix),
+ 					  GDK_GC_XGC (xtext->fgc), ximg, 0, 0, 0, 0, w, h);


Index: xchat.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xchat/F-7/xchat.spec,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- xchat.spec	17 Jan 2008 23:49:43 -0000	1.77
+++ xchat.spec	19 Jan 2008 06:14:35 -0000	1.78
@@ -3,7 +3,7 @@
 Summary:   A popular and easy to use graphical IRC (chat) client
 Name:      xchat
 Version:   2.8.4
-Release:   8%{?dist}
+Release:   11%{?dist}
 Epoch:     1
 Group:     Applications/Internet
 License:   GPLv2+
@@ -26,6 +26,7 @@
 Patch19: xchat-2.0.2-freenode.patch
 # see #241923
 Patch35: xchat-2.8.4-disable-tray-icon-by-default.patch
+Patch40: xchat-2.8.4-shm-pixmaps.patch
 
 BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel
 BuildRequires: GConf2-devel
@@ -72,6 +73,7 @@
 %patch12 -p0 -b .use-sysconf-to-detect-cpus
 %patch19 -p0 -b .freenode
 %patch35 -p1 -b .tray-icon
+%patch40 -p1 -b .shm-pixmaps
 
 %build
 # Remove CVS files from source dirs so they're not installed into doc dirs.
@@ -160,6 +162,17 @@
 %{_libdir}/xchat/plugins/tcl.so
 
 %changelog
+* Sat Jan 19 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.8.4-11
+- fix bug in xchat-2.8.4-shm-pixmaps.patch (Adam Jackson, #429218)
+
+* Thu Jan  3 2008 Christopher Aillon <caillon at redhat.com> 1:2.8.4-10
+- Rebuild
+
+* Thu Dec 20 2007 Adam Jackson <ajax at redhat.com> 1:2.8.4-9
+- xchat-2.8.4-shm-pixmaps.patch: MIT-SHM pixmaps are optional, and when
+  using EXA they are not available.  Check that the server supports them
+  before trying to create them so we don't crash.
+
 * Wed Dec 19 2007 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.8.4-8
 - apply xc284-fix-scrollbfdleak.diff from upstream
 




More information about the fedora-extras-commits mailing list