summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index eb183bd..19ac86c 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -1070,8 +1070,8 @@ Tk_WmObjCmd(
return TCL_OK;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -1405,8 +1405,8 @@ WmAttributesCmd(
Tcl_SetObjResult(interp, result);
return TCL_OK;
} else if (objc == 4) { /* wm attributes $win -attribute */
- if (Tcl_GetIndexFromObj(interp, objv[3], WmAttributeNames,
- "attribute", 0, &attribute) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], WmAttributeNames,
+ sizeof(char *), "attribute", 0, &attribute) != TCL_OK) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, WmGetAttribute(winPtr, attribute));
@@ -1415,8 +1415,8 @@ WmAttributesCmd(
int i;
for (i = 3; i < objc; i += 2) {
- if (Tcl_GetIndexFromObj(interp, objv[i], WmAttributeNames,
- "attribute", 0, &attribute) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], WmAttributeNames,
+ sizeof(char *), "attribute", 0, &attribute) != TCL_OK) {
return TCL_ERROR;
}
if (WmSetAttribute(winPtr,interp,attribute,objv[i+1]) != TCL_OK) {
@@ -1778,8 +1778,8 @@ WmFocusmodelCmd(
return TCL_OK;
}
- if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_ACTIVE) {
@@ -1826,6 +1826,11 @@ WmForgetCmd(
~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
RemapWindows(winPtr, winPtr->parentPtr);
+ /*
+ * Make sure wm no longer manages this window
+ */
+ Tk_ManageGeometry(frameWin, NULL, NULL);
+
/*
* Flags (above) must be cleared before calling TkMapTopFrame (below).
*/
@@ -2957,8 +2962,8 @@ WmPositionfromCmd(
if (*Tcl_GetString(objv[3]) == '\0') {
wmPtr->sizeHintsFlags &= ~(USPosition|PPosition);
} else {
- if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_USER) {
@@ -3194,8 +3199,8 @@ WmSizefromCmd(
if (*Tcl_GetString(objv[3]) == '\0') {
wmPtr->sizeHintsFlags &= ~(USSize|PSize);
} else {
- if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_USER) {
@@ -3318,8 +3323,8 @@ WmStackorderCmd(
/* ASSERT: index1 != -1 && index2 != -2 [Bug 1789819] */
ckfree(windows);
- if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == OPT_ISABOVE) {
@@ -3378,8 +3383,8 @@ WmStateCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[3], optionStrings, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[3], optionStrings,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -3734,7 +3739,7 @@ WmWaitMapProc(
* This function is invoked by a widget when it wishes to set a grid
* coordinate system that controls the size of a top-level window. It
* provides a C interface equivalent to the "wm grid" command and is
- * usually asscoiated with the -setgrid option.
+ * usually associated with the -setgrid option.
*
* Results:
* None.
@@ -6275,7 +6280,7 @@ TkWmProtocolEventProc(
Tcl_Preserve(protPtr);
interp = protPtr->interp;
Tcl_Preserve(interp);
- result = Tcl_GlobalEval(interp, protPtr->command);
+ result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (command for \"%s\" window manager protocol)",