Skip to content

Commit

Permalink
merge trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
fvogelnew1 committed Jan 4, 2025
2 parents 7a1180f + f2b81c0 commit b6fda36
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ to the userbase.
- [inaccurate scrollbar error-message](https://core.tcl-lang.org/tk/tktview/f88118)
- [Build tk 9.0.1 failed on macos 10.13](https://core.tcl-lang.org/tk/tktview/cb5d77)
- [image svg upstream out of bound read nanosvg#262](https://core.tcl-lang.org/tk/tktview/121786)
- [wm iconbitmap does not correctly set the icon pixmap hint on macOS](https://core.tcl-lang.org/tk/tktview/13ac26)

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

Expand Down
15 changes: 8 additions & 7 deletions macosx/tkMacOSXWm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2977,14 +2977,15 @@ WmIconbitmapCmd(
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;
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) {
Expand Down
10 changes: 2 additions & 8 deletions tests/unixWm.test
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,9 @@ test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} {
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 {
test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} unix {
list [catch {wm iconbitmap .t bad-bitmap} msg] $msg
} $result_22_3
} {1 {bitmap "bad-bitmap" not defined}}

test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix {
list [catch {wm iconify .t 12} msg] $msg
Expand Down
4 changes: 2 additions & 2 deletions tests/wm.test
Original file line number Diff line number Diff line change
Expand Up @@ -878,11 +878,11 @@ test wm-iconbitmap-1.2.2 {usage} -constraints win -returnCodes error -body {
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 {
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} -constraints notAqua -setup {
test wm-iconbitmap-2.1 {setting and reading values} -setup {
set result {}
} -body {
lappend result [wm iconbitmap .t]
Expand Down
2 changes: 1 addition & 1 deletion unix/tkUnixFont.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int SeenName(const char *name, Tcl_DString *dsPtr);
*/

static XFontStruct *
XLoadQueryFontNoXError(Display *display, char *name)
XLoadQueryFontNoXError(Display *display, const char *name)
{
XFontStruct *fontStructPtr = NULL;
Tk_ErrorHandler handler;
Expand Down

0 comments on commit b6fda36

Please sign in to comment.