Tk Source Code

Check-in [584ec155]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug-3480634: PNG Images missing in menus on Mac
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 584ec155fe6ab0766124d7b3e06e807b348cc206
User & Date: jan.nijtmans 2012-01-29 17:19:44
Context
2012-01-30
19:50
ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561]. check-in: 0da69ac8 user: jenglish tags: trunk
2012-01-29
17:19
Bug-3480634: PNG Images missing in menus on Mac check-in: 584ec155 user: jan.nijtmans tags: trunk
17:12
Bug 3480634: PNG Images missing in menus on Mac check-in: 11b15014 user: jan.nijtmans tags: core-8-5-branch
17:05
Add copyright info check-in: 47f3414b user: kevin_walzer tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.





1
2
3
4
5
6
7




2012-01-27  Jan Nijtmans  <[email protected]>

	* win/tkWinDialog.c: [Bug 3480471]: tk_getOpenFile crashes on Win64

2012-01-26  Francois Vogel  <[email protected]>

	* generic/tkTextDisp.c: [Bug-1754043] and [Bug-2321450]: When
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
2012-01-29  Jan Nijtmans  <[email protected]>

	* win/tkImgPhoto.c: [Bug 3480634]: PNG Images missing in menus on Mac

2012-01-27  Jan Nijtmans  <[email protected]>

	* win/tkWinDialog.c: [Bug 3480471]: tk_getOpenFile crashes on Win64

2012-01-26  Francois Vogel  <[email protected]>

	* generic/tkTextDisp.c: [Bug-1754043] and [Bug-2321450]: When
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

2012-01-25  Francois Vogel  <[email protected]>

	* generic/tkText.c: [Bug-3475627]: Test text-31.11 fails

2012-01-22  Francois Vogel  <[email protected]>

	* generic/tkTextMark.c: [Bug-3288113,3288121]: Missing marks/endless 
	* tests/textMark.test:  loop in text mark prev/next

2012-01-19  Francois Vogel  <[email protected]>

	* generic/tkText.c: [Bug-3021557]: Moving the cursor in
	* tests/text.test:  elided text freezes Tk








|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

2012-01-25  Francois Vogel  <[email protected]>

	* generic/tkText.c: [Bug-3475627]: Test text-31.11 fails

2012-01-22  Francois Vogel  <[email protected]>

	* generic/tkTextMark.c: [Bug-3288113,3288121]: Missing marks/endless
	* tests/textMark.test:  loop in text mark prev/next

2012-01-19  Francois Vogel  <[email protected]>

	* generic/tkText.c: [Bug-3021557]: Moving the cursor in
	* tests/text.test:  elided text freezes Tk

Changes to generic/tkImgPhInstance.c.

631
632
633
634
635
636
637

638
639
640
641
642
643
644
645
	 * Pull the current background from the display to blend with
	 */

	bgImg = XGetImage(display, drawable, drawableX, drawableY,
		(unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap);
	if (bgImg == NULL) {
	    Tk_DeleteErrorHandler(handler);

	    return;
	}

	BlendComplexAlpha(bgImg, instancePtr, imageX, imageY, width, height);

	/*
	 * Color info is unimportant as we only do this operation for depth >=
	 * 15.







>
|







631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
	 * Pull the current background from the display to blend with
	 */

	bgImg = XGetImage(display, drawable, drawableX, drawableY,
		(unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap);
	if (bgImg == NULL) {
	    Tk_DeleteErrorHandler(handler);
	    /* 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);

	/*
	 * Color info is unimportant as we only do this operation for depth >=
	 * 15.
653
654
655
656
657
658
659

660
661
662
663
664
665
666
    } else {
	/*
	 * masterPtr->region describes which parts of the image contain valid
	 * data. We set this region as the clip mask for the gc, setting its
	 * origin appropriately, and use it when drawing the image.
	 */


	TkSetRegion(display, instancePtr->gc,
		instancePtr->masterPtr->validRegion);
	XSetClipOrigin(display, instancePtr->gc, drawableX - imageX,
		drawableY - imageY);
	XCopyArea(display, instancePtr->pixels, drawable, instancePtr->gc,
		imageX, imageY, (unsigned) width, (unsigned) height,
		drawableX, drawableY);







>







654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
    } else {
	/*
	 * masterPtr->region describes which parts of the image contain valid
	 * data. We set this region as the clip mask for the gc, setting its
	 * origin appropriately, and use it when drawing the image.
	 */

    fallBack:
	TkSetRegion(display, instancePtr->gc,
		instancePtr->masterPtr->validRegion);
	XSetClipOrigin(display, instancePtr->gc, drawableX - imageX,
		drawableY - imageY);
	XCopyArea(display, instancePtr->pixels, drawable, instancePtr->gc,
		imageX, imageY, (unsigned) width, (unsigned) height,
		drawableX, drawableY);