pkgsrc/wm/icewm/patches/patch-src_ypixbuf.cc
ryoon 25bfe0bcf6 Update to 1.2.38pre2
* Fix wrong color on NetBSD/evbearmv6hf-el with Yasushi Oshima's patch

Chagnelog:
1.2.38pre2:
	- various bug fixes

1.2.38pre1:
	- xinerama fixes
        - app-group transient window implementation
	- FreeBSD ACPI support - Alexander Motin (amotin)

1.2.37:
	- fix centering of transient windows over parents (Bert Wesarg)
	- check if window is allowed to be moved, before starting movement (Bert Wesarg)
	- fix key handling on buttons

1.2.36:
	- add option TaskBarFullscreenAutoShow (default = 1)

1.2.36pre2: 2008-08-17
	- regrab keyboard bindings when keyboard mapping changes

1.2.36pre1: 2008-08-07
	- fix unresponsive taskbar when PassFirstClickToClient=0
	- add support for sysfs interface (instead of proc) for battery
          status (initial code by Santiago Garcia Mantinan)
	- fix maximized window repositioning on fullscreen toggle
	- bug 1852567 - make searching for icons more consistent (iconPath first,
          search each directory first for all possible types - xpm, png)
	- Italian translation update
	- Korean translation update
	- translation cleanup: converted .po files to UTF-8
2014-01-05 12:29:33 +00:00

46 lines
1.9 KiB
C++

$NetBSD: patch-src_ypixbuf.cc,v 1.1 2014/01/05 12:29:33 ryoon Exp $
From http://www.yagoto-urayama.jp/~oshimaya/netbsd/files/icewm-1.2.35.diff
Fix color
--- src/ypixbuf.cc.orig 2009-11-08 18:59:46.000000000 +0000
+++ src/ypixbuf.cc
@@ -570,6 +570,23 @@ static void copyPixbufToRGB32(unsigned c
}
template <int Channels>
+static void copyPixbufToBGR32(unsigned char const * src, unsigned const sStep,
+ char * dst, unsigned const dStep,
+ unsigned const width, unsigned const height) {
+ MSG(("copyPixbufToRGB32"));
+
+ for (unsigned y(height); y > 0; --y, src+= sStep, dst+= dStep) {
+ unsigned char const * s(src); char * d(dst);
+ for (unsigned x(width); x-- > 0; s+= Channels, d+= 4)
+ {
+ d[0] = s[0];
+ d[1] = s[1];
+ d[2] = s[2];
+ }
+ }
+}
+
+template <int Channels>
static void copyPixbufToRGB565(unsigned char const * src, unsigned const sStep,
char * dst, unsigned const dStep,
unsigned const width, unsigned const height) {
@@ -651,10 +668,12 @@ static void copyPixbufToImage(YPixbuf::P
unsigned const width(image.width), height(image.height);
if (image.depth > 16) {
- if (CHANNEL_MASK(image, 0xff0000, 0x00ff00, 0x0000ff) ||
- CHANNEL_MASK(image, 0x0000ff, 0x00ff00, 0xff0000))
+ if (CHANNEL_MASK(image, 0xff0000, 0x00ff00, 0x0000ff))
copyPixbufToRGB32<Channels> (pixels, rowstride,
image.data, image.bytes_per_line, width, height);
+ else if (CHANNEL_MASK(image, 0x0000ff, 0x00ff00, 0xff0000))
+ copyPixbufToBGR32<Channels> (pixels, rowstride,
+ image.data, image.bytes_per_line, width, height);
else
copyPixbufToRGBAny<yuint32, Channels> (pixels, rowstride,
image.data, image.bytes_per_line, width, height,