[arch-commits] Commit in w3m/trunk (PKGBUILD color.patch)

Gaetan Bisson bisson at archlinux.org
Fri Oct 23 21:06:44 UTC 2015


    Date: Friday, October 23, 2015 @ 23:06:44
  Author: bisson
Revision: 249708

fix FS#46836

Added:
  w3m/trunk/color.patch
Modified:
  w3m/trunk/PKGBUILD

-------------+
 PKGBUILD    |    4 +++-
 color.patch |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-10-23 20:54:53 UTC (rev 249707)
+++ PKGBUILD	2015-10-23 21:06:44 UTC (rev 249708)
@@ -4,7 +4,7 @@
 
 pkgname=w3m
 pkgver=0.5.3
-pkgrel=9
+pkgrel=10
 pkgdesc='Text-based Web browser, as well as pager'
 url='http://w3m.sourceforge.net/'
 license=('custom')
@@ -16,6 +16,7 @@
         'form_unknown.patch'
         'file_handle.patch'
         'https.patch'
+        'color.patch'
         'perl.patch'
         'gc72.patch')
 sha1sums=('444b6c8cf7094ee95f8e9de96b37f814b9d83237'
@@ -22,6 +23,7 @@
           '23d648033ad77f3c67d370c62cf7b7ed86b5c6f2'
           '457de43be7eabc652614461a7ab25e3ba76b2aff'
           '66affb2f695fe0bdde25cf774642bfd6a9404e88'
+          '9c30038c7672508a93e55044248b29ed572cc13e'
           'a8fb1f738688104ad8f0713bd981083e12e878ad'
           '7baa06ca684fd140503a2adc65e2d606970c4662')
 

Added: color.patch
===================================================================
--- color.patch	                        (rev 0)
+++ color.patch	2015-10-23 21:06:44 UTC (rev 249708)
@@ -0,0 +1,44 @@
+--- a/w3mimg/x11/x11_w3mimg.c	2004-11-08 12:14:06.000000000 -0500
++++ b/w3mimg/x11/x11_w3mimg.c	2015-03-12 23:23:44.964555734 -0400
+@@ -214,9 +214,12 @@
+ 	Pixmap p;
+ 	GC gc;
+ 	XImage *i;
++	XWindowAttributes attr;
++
++	XGetWindowAttributes(xi->display, xi->window, &attr);
+ 
+ 	p = XCreatePixmap(xi->display, xi->window, 1, 1,
+-			  DefaultDepth(xi->display, 0));
++			  attr.depth);
+ 	gc = XCreateGC(xi->display, xi->window, 0, NULL);
+ 	if (!p || !gc)
+ 	    exit(1);		/* XXX */
+@@ -328,6 +331,7 @@
+     ImlibImage *im;
+ #elif defined(USE_IMLIB2)
+     Imlib_Image im;
++    XWindowAttributes attr;
+ #elif defined(USE_GDKPIXBUF)
+     GdkPixbufAnimation *animation;
+     int j, iw, ih, n, frame_num, delay = -1, max_anim;
+@@ -374,15 +378,16 @@
+ 	w = imlib_image_get_width();
+     if (h <= 0)
+ 	h = imlib_image_get_height();
++    XGetWindowAttributes(xi->display, xi->window, &attr);
+     img->pixmap = (void *)XCreatePixmap(xi->display, xi->parent, w, h,
+-					DefaultDepth(xi->display, 0));
++					attr.depth);
+     if (!img->pixmap)
+ 	return 0;
+     XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
+     XFillRectangle(xi->display, (Pixmap) img->pixmap, xi->imageGC, 0, 0, w, h);
+     imlib_context_set_display(xi->display);
+-    imlib_context_set_visual(DefaultVisual(xi->display, 0));
+-    imlib_context_set_colormap(DefaultColormap(xi->display, 0));
++    imlib_context_set_visual(attr.visual);
++    imlib_context_set_colormap(attr.colormap);
+     imlib_context_set_drawable((Drawable) img->pixmap);
+     imlib_render_image_on_drawable_at_size(0, 0, w, h);
+     imlib_free_image();



More information about the arch-commits mailing list