summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-01-29 17:19:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-01-29 17:19:44 (GMT)
commit15408cb5b1c3c082479bd6a2ae86cc37fd7028fa (patch)
tree53040e8f6024cafa32bb61391bc131bd032e521d
parent9909fe0702246418f9036cc460b47d6b1299d31c (diff)
parent7636fd130439ccf2735dddd592ff733327b12951 (diff)
downloadtk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.zip
tk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.tar.gz
tk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.tar.bz2
Bug-3480634: PNG Images missing in menus on Mac
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkImgPhInstance.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 470be1b..fd1f1c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-29 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tkImgPhoto.c: [Bug 3480634]: PNG Images missing in menus on Mac
+
2012-01-27 Jan Nijtmans <nijtmans@users.sf.net>
* win/tkWinDialog.c: [Bug 3480471]: tk_getOpenFile crashes on Win64
@@ -29,7 +33,7 @@
2012-01-22 Francois Vogel <fvogelnew1@free.fr>
- * generic/tkTextMark.c: [Bug-3288113,3288121]: Missing marks/endless
+ * generic/tkTextMark.c: [Bug-3288113,3288121]: Missing marks/endless
* tests/textMark.test: loop in text mark prev/next
2012-01-19 Francois Vogel <fvogelnew1@free.fr>
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 04f65e2..5429ee3 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -635,7 +635,8 @@ TkImgPhotoDisplay(
(unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap);
if (bgImg == NULL) {
Tk_DeleteErrorHandler(handler);
- return;
+ /* We failed to get the image so draw without blending alpha. It's the best we can do */
+ goto fallBack;
}
BlendComplexAlpha(bgImg, instancePtr, imageX, imageY, width, height);
@@ -657,6 +658,7 @@ TkImgPhotoDisplay(
* origin appropriately, and use it when drawing the image.
*/
+ fallBack:
TkSetRegion(display, instancePtr->gc,
instancePtr->masterPtr->validRegion);
XSetClipOrigin(display, instancePtr->gc, drawableX - imageX,