summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-01-29 17:12:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-01-29 17:12:36 (GMT)
commit7636fd130439ccf2735dddd592ff733327b12951 (patch)
treee430c0c140e494b55c4c2f61681a3467d98305b8 /generic
parente8a09c1e3781b903a799c0325e0ff53b0c3f96a7 (diff)
downloadtk-7636fd130439ccf2735dddd592ff733327b12951.zip
tk-7636fd130439ccf2735dddd592ff733327b12951.tar.gz
tk-7636fd130439ccf2735dddd592ff733327b12951.tar.bz2
Bug 3480634: PNG Images missing in menus on Mac
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImgPhoto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index a6df6ef..6075da8 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -2791,7 +2791,8 @@ ImgPhotoDisplay(
(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;
}
ImgPhotoBlendComplexAlpha(bgImg, instancePtr, imageX, imageY, width,
@@ -2814,6 +2815,7 @@ ImgPhotoDisplay(
* origin appropriately, and use it when drawing the image.
*/
+ fallBack:
TkSetRegion(display, instancePtr->gc,
instancePtr->masterPtr->validRegion);
XSetClipOrigin(display, instancePtr->gc, drawableX - imageX,