projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38b4d62
)
screensaver: fix decoding of transparency in xpm files
author
Philipp Brüschweiler
<blei42@gmail.com>
Thu, 6 Sep 2012 13:23:28 +0000
(15:23 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 7 Sep 2012 01:08:12 +0000
(21:08 -0400)
Use 0 as transparent pixel. This is needed when using premultiplied
alpha.
clients/wscreensaver-glue.c
patch
|
blob
|
history
diff --git
a/clients/wscreensaver-glue.c
b/clients/wscreensaver-glue.c
index
a548599
..
55d0a8c
100644
(file)
--- a/
clients/wscreensaver-glue.c
+++ b/
clients/wscreensaver-glue.c
@@
-80,14
+80,14
@@
read_xpm_color(uint32_t *ctable, const char *line)
value = strtol(&cstr[1], &end, 16);
if (strcmp(cstr, "None") == 0)
- ctable[key] = 0x00
ffffff
;
+ ctable[key] = 0x00
000000
;
else if (cstr[0] != '#' || !(cstr[1] != '\0' && *end == '\0')) {
fprintf(stderr, "%s: error interpreting XPM color '%s'\n",
progname, cstr);
return;
+ } else {
+ ctable[key] = value | 0xff000000;
}
-
- ctable[key] = value | 0xff000000;
}
static void