summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 117b539..bddbe05 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -4384,9 +4384,9 @@ WmIconphotoCmd(
if (!iconInfo.hbmColor) {
ckfree(lpIR);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "failed to create color bitmap for \"%s\"",
+ "failed to create an iconphoto with image \"%s\"",
Tcl_GetString(objv[i])));
- Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "BITMAP", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "IMAGE", NULL);
return TCL_ERROR;
}
@@ -5195,18 +5195,18 @@ WmStackorderCmd(
if (objc == 3) {
windows = TkWmStackorderToplevel(winPtr);
- if (windows == NULL) {
- Tcl_Panic("TkWmStackorderToplevel failed");
- }
-
- resultObj = Tcl_NewObj();
- for (windowPtr = windows; *windowPtr ; windowPtr++) {
- Tcl_ListObjAppendElement(NULL, resultObj,
- TkNewWindowObj((Tk_Window) *windowPtr));
+ if (windows != NULL) {
+ resultObj = Tcl_NewObj();
+ for (windowPtr = windows; *windowPtr ; windowPtr++) {
+ Tcl_ListObjAppendElement(NULL, resultObj,
+ TkNewWindowObj((Tk_Window) *windowPtr));
+ }
+ Tcl_SetObjResult(interp, resultObj);
+ ckfree(windows);
+ return TCL_OK;
+ } else {
+ return TCL_ERROR;
}
- Tcl_SetObjResult(interp, resultObj);
- ckfree(windows);
- return TCL_OK;
} else {
TkWindow *winPtr2, **winPtr2Ptr = &winPtr2;
int index1 = -1, index2 = -1, result;
@@ -6812,8 +6812,6 @@ TkWmStackorderToplevel(
(LPARAM) &pair) == 0) {
ckfree(windows);
windows = NULL;
- } else if (pair.windowPtr != (windows-1)) {
- Tcl_Panic("num matched toplevel windows does not equal num children");
}
done: