Tk Source Code

Changes On Branch bug-13ac26b35d
Login

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

Changes In Branch bug-13ac26b35d Excluding Merge-Ins

This is equivalent to a diff from c4f6d582 to 961b98f3

2025-01-03
20:13
Fix [13ac26b35d]: wm iconbitmap does not correctly set the icon pixmap hint on macOS. Thanks to Serhiy Storchaka. check-in: 92b82ec1 user: fvogel tags: trunk, main
05:34
Merge trunk. In branch less_tests_constraints, let's work off trunk from now on. check-in: 49fdd4b2 user: fvogel tags: less_tests_constraints
2025-01-02
12:13
Fix the expected result of test unixWm-22.3 for aqua since [18bde332] fixes the behaviour for this platform. All platforms now have the same behaviour and expected result for [wm iconbitmap]. Closed-Leaf check-in: 961b98f3 user: fvogel tags: bug-13ac26b35d
2025-01-01
17:48
Merge trunk check-in: 38e5b0d7 user: kevin_walzer tags: tka11y
12:01
Fix typo. check-in: e5c50f77 user: fvogel tags: bug-13ac26b35d
11:32
Backout [50d0ece3]. check-in: 9015b861 user: fvogel tags: bug-13ac26b35d
2024-12-22
13:44
Merge 9.0 check-in: 810d4730 user: jan.nijtmans tags: revised_text, tip-466
12:58
Merge 9.0 check-in: f2d11f65 user: jan.nijtmans tags: tip-626
12:28
(cherry-pick): Fix [121786c0]: image svg upstream out of bound read nanosvg#262 check-in: a64fbcd2 user: jan.nijtmans tags: core-8-branch
12:07
Fix [121786c0]: image svg upstream out of bound read nanosvg#262 check-in: c4f6d582 user: jan.nijtmans tags: trunk, main
11:56
Fix [cb5d776b12]: Build tk 9.0.1 failed on macos 10.13 check-in: f8b5b46f user: jan.nijtmans tags: trunk, main
2024-12-19
22:04
ticket [121786c0] image svg upstream out of bound read nanosvg#262 Closed-Leaf check-in: f284f330 user: oehhar tags: 121786c0-nanosvg-262

Changes to .github/workflows/linux-build.yml.
1
2
3
4
5
6
7

8
9
10
11
12
13
14
name: Linux
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"

    tags:
    - "core-**"
permissions:
  contents: read
defaults:
  run:
    shell: bash







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name: Linux
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"
    - "bug-13ac26b35d"
    tags:
    - "core-**"
permissions:
  contents: read
defaults:
  run:
    shell: bash
Changes to .github/workflows/mac-build.yml.
1
2
3
4
5
6
7

8
9
10
11
12
13
14
name: macOS
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"

    tags:
    - "core-**"
permissions:
  contents: read
env:
  ERROR_ON_FAILURES: 1
jobs:







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name: macOS
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"
    - "bug-13ac26b35d"
    tags:
    - "core-**"
permissions:
  contents: read
env:
  ERROR_ON_FAILURES: 1
jobs:
Changes to .github/workflows/win-build.yml.
1
2
3
4
5
6
7

8
9
10
11
12
13
14
name: Windows
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"

    tags:
    - "core-**"
permissions:
  contents: read
env:
  ERROR_ON_FAILURES: 1
jobs:







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name: Windows
on:
  push:
    branches:
    - "main"
    - "core-8-branch"
    - "core-8-6-branch"
    - "bug-13ac26b35d"
    tags:
    - "core-**"
permissions:
  contents: read
env:
  ERROR_ON_FAILURES: 1
jobs:
Changes to changes.md.
51
52
53
54
55
56
57

58
59
60
61
62
63
64
 - [cannot build .chm help file (Windows)](https://core.tcl-lang.org/tk/tktview/bb110c)
 - [Tk initialization overwrites thread specific data](https://core.tcl-lang.org/tk/tktview/bcbf4c)
 - [File clamTheme.tcl misses code related to the -indicatorforeground option](https://core.tcl-lang.org/tk/tktview/a69fd7)
 - [Segfault when using menu(button) with the -font option](https://core.tcl-lang.org/tk/tktview/8ce672)
 - [Bind mechanism vs. GNOME](https://core.tcl-lang.org/tk/tktview/6bdf1a)
 - [many PIXEL options don't keep their configured value](https://core.tcl-lang.org/tk/tktview/29ba53)
 - [Menu entry underline does not consider activeborderwidth](https://core.tcl-lang.org/tk/tktview/844c0b)


Release Tk 9.0.0 arises from the check-in with tag `core-9-0-0`.

Highlighted differences between Tk 9.0 and Tk 8.6 are summarized below,
with focus on changes important to programmers using the Tk library and
writing Tcl scripts containing Tk commands.








>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 - [cannot build .chm help file (Windows)](https://core.tcl-lang.org/tk/tktview/bb110c)
 - [Tk initialization overwrites thread specific data](https://core.tcl-lang.org/tk/tktview/bcbf4c)
 - [File clamTheme.tcl misses code related to the -indicatorforeground option](https://core.tcl-lang.org/tk/tktview/a69fd7)
 - [Segfault when using menu(button) with the -font option](https://core.tcl-lang.org/tk/tktview/8ce672)
 - [Bind mechanism vs. GNOME](https://core.tcl-lang.org/tk/tktview/6bdf1a)
 - [many PIXEL options don't keep their configured value](https://core.tcl-lang.org/tk/tktview/29ba53)
 - [Menu entry underline does not consider activeborderwidth](https://core.tcl-lang.org/tk/tktview/844c0b)
 - [wm iconbitmap does not correctly set the icon pixmap hint on macOS](https://core.tcl-lang.org/tk/tktview/13ac26)

Release Tk 9.0.0 arises from the check-in with tag `core-9-0-0`.

Highlighted differences between Tk 9.0 and Tk 8.6 are summarized below,
with focus on changes important to programmers using the Tk library and
writing Tcl scripts containing Tk commands.

Changes to macosx/tkMacOSXWm.c.
2973
2974
2975
2976
2977
2978
2979
2980


2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
    if (winPtr->window == None) {
	Tk_MakeWindowExist((Tk_Window)winPtr);
    }
    if (!TkMacOSXHostToplevelExists(winPtr)) {
	TkMacOSXMakeRealWindowExist(winPtr);
    }
    if (WmSetAttribute(winPtr, TkMacOSXGetNSWindowForDrawable(winPtr->window), interp,
	    WMATT_TITLEPATH, objv[3]) == TCL_OK) {


	if (!len) {
	    if (wmPtr->hints.icon_pixmap != None) {
		Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap);
		wmPtr->hints.icon_pixmap = None;
	    }
	    wmPtr->hints.flags &= ~IconPixmapHint;
	}
    } else {
	pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, str);
	if (pixmap == None) {
	    return TCL_ERROR;
	}
	wmPtr->hints.icon_pixmap = pixmap;
	wmPtr->hints.flags |= IconPixmapHint;







|
>
>
|
|
|
|
|
|
<







2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988

2989
2990
2991
2992
2993
2994
2995
    if (winPtr->window == None) {
	Tk_MakeWindowExist((Tk_Window)winPtr);
    }
    if (!TkMacOSXHostToplevelExists(winPtr)) {
	TkMacOSXMakeRealWindowExist(winPtr);
    }
    if (WmSetAttribute(winPtr, TkMacOSXGetNSWindowForDrawable(winPtr->window), interp,
	    WMATT_TITLEPATH, objv[3]) != TCL_OK) {
	return TCL_ERROR;
    }
    if (!len) {
	if (wmPtr->hints.icon_pixmap != None) {
	    Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap);
	    wmPtr->hints.icon_pixmap = None;
	}
	wmPtr->hints.flags &= ~IconPixmapHint;

    } else {
	pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, str);
	if (pixmap == None) {
	    return TCL_ERROR;
	}
	wmPtr->hints.icon_pixmap = pixmap;
	wmPtr->hints.flags |= IconPixmapHint;
Changes to tests/unixWm.test.
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826

827
828
829
830
831
832
833
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
    wm iconbitmap .t {}
    set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
} {{} questhead 0x4 {} 0x0}
if {[tk windowingsystem] eq "aqua"} {
    set result_22_3 {0 {}}
} else {
    set result_22_3 {1 {bitmap "bad-bitmap" not defined}}
}
test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option for unix only} \
unix {
    list [catch {wm iconbitmap .t bad-bitmap} msg] $msg
} $result_22_3


test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix {
    list [catch {wm iconify .t 12} msg] $msg
} {1 {wrong # args: should be "wm iconify window"}}
test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2







<
<
<
<
<
|
<

<
>







811
812
813
814
815
816
817





818

819

820
821
822
823
824
825
826
827
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
    wm iconbitmap .t {}
    set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
} {{} questhead 0x4 {} 0x0}





test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} unix {

    list [catch {wm iconbitmap .t bad-bitmap} msg] $msg

} {1 {bitmap "bad-bitmap" not defined}}

test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix {
    list [catch {wm iconify .t 12} msg] $msg
} {1 {wrong # args: should be "wm iconify window"}}
test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
Changes to tests/wm.test.
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
} -result {wrong # args: should be "wm iconbitmap window ?bitmap?"}
test wm-iconbitmap-1.2.2 {usage} -constraints win -returnCodes error -body {
    wm iconbitmap .t 12 13 14
} -result {wrong # args: should be "wm iconbitmap window ?-default? ?image?"}
test wm-iconbitmap-1.3 {usage} -constraints win -returnCodes error -body {
    wm iconbitmap .t 12 13
} -result {illegal option "12" must be "-default"}
test wm-iconbitmap-1.4 {usage} -constraints notAqua -returnCodes error -body {
    wm iconbitmap .t bad-bitmap
} -result {bitmap "bad-bitmap" not defined}

test wm-iconbitmap-2.1 {setting and reading values} -constraints notAqua -setup {
    set result {}
} -body {
    lappend result [wm iconbitmap .t]
    wm iconbitmap .t hourglass
    lappend result [wm iconbitmap .t]
    wm iconbitmap .t {}
    lappend result [wm iconbitmap .t]







|



|







874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
} -result {wrong # args: should be "wm iconbitmap window ?bitmap?"}
test wm-iconbitmap-1.2.2 {usage} -constraints win -returnCodes error -body {
    wm iconbitmap .t 12 13 14
} -result {wrong # args: should be "wm iconbitmap window ?-default? ?image?"}
test wm-iconbitmap-1.3 {usage} -constraints win -returnCodes error -body {
    wm iconbitmap .t 12 13
} -result {illegal option "12" must be "-default"}
test wm-iconbitmap-1.4 {usage} -returnCodes error -body {
    wm iconbitmap .t bad-bitmap
} -result {bitmap "bad-bitmap" not defined}

test wm-iconbitmap-2.1 {setting and reading values} -setup {
    set result {}
} -body {
    lappend result [wm iconbitmap .t]
    wm iconbitmap .t hourglass
    lappend result [wm iconbitmap .t]
    wm iconbitmap .t {}
    lappend result [wm iconbitmap .t]