summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tkWinWm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 10087f2..6a23ff3 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -4288,7 +4288,7 @@ WmIconphotoCmd(
TkWindow *useWinPtr = winPtr; /* window to apply to (NULL if -default) */
Tk_PhotoHandle photo;
Tk_PhotoImageBlock block;
- int i, width, height, startObj = 3;
+ int i, width, height, startObj = 3, isDefault = 0;
BlockOfIconImagesPtr lpIR;
WinIconPtr titlebaricon = NULL;
HICON hIcon;
@@ -4310,6 +4310,15 @@ WmIconphotoCmd(
"window ?-default? image1 ?image2 ...?");
return TCL_ERROR;
}
+
+ if (strcmp(Tcl_GetString(objv[3]), "-default") == 0) {
+ isDefault = 1;
+ if (objc == 4) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "window ?-default? image1 ?image2 ...?");
+ return TCL_ERROR;
+ }
+ }
/*
* Get icon name. We only use the first icon name.