summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhInstance.c
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 /generic/tkImgPhInstance.c
parent9909fe0702246418f9036cc460b47d6b1299d31c (diff)
parent7636fd130439ccf2735dddd592ff733327b12951 (diff)
downloadtk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.zip
tk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.tar.gz
tk-15408cb5b1c3c082479bd6a2ae86cc37fd7028fa.tar.bz2
Bug-3480634: PNG Images missing in menus on Mac
Diffstat (limited to 'generic/tkImgPhInstance.c')
-rw-r--r--generic/tkImgPhInstance.c4
1 files changed, 3 insertions, 1 deletions
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,