summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-10 17:04:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-10 17:04:41 (GMT)
commited36cf228c15623a65b89fc174ffc6668179f221 (patch)
tree9be53e00e57e05eabbfec0206fbd6cbba188f823 /win
parent525ee9b1ac100b2015f585612c4d1b7a9a336024 (diff)
downloadtk-ed36cf228c15623a65b89fc174ffc6668179f221.zip
tk-ed36cf228c15623a65b89fc174ffc6668179f221.tar.gz
tk-ed36cf228c15623a65b89fc174ffc6668179f221.tar.bz2
Use pixels in stead of ints in the "wm minsize" and "wm maxsize" commands, so those become scalable.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 8196eb3..f97f2e4 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -4623,7 +4623,7 @@ WmManageCmd(
static int
WmMaxsizeCmd(
- TCL_UNUSED(Tk_Window), /* Main window of the application. */
+ Tk_Window tkwin, /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -4645,8 +4645,8 @@ WmMaxsizeCmd(
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
- if ((Tcl_GetIntFromObj(interp, objv[3], &width) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[4], &height) != TCL_OK)) {
+ if ((Tk_GetPixelsFromObj(interp, tkwin, objv[3], &width) != TCL_OK)
+ || (Tk_GetPixelsFromObj(interp, tkwin, objv[4], &height) != TCL_OK)) {
return TCL_ERROR;
}
wmPtr->maxWidth = width;
@@ -4674,7 +4674,7 @@ WmMaxsizeCmd(
static int
WmMinsizeCmd(
- TCL_UNUSED(Tk_Window), /* Main window of the application. */
+ Tk_Window tkwin, /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -4696,8 +4696,8 @@ WmMinsizeCmd(
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
- if ((Tcl_GetIntFromObj(interp, objv[3], &width) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[4], &height) != TCL_OK)) {
+ if ((Tk_GetPixelsFromObj(interp, tkwin, objv[3], &width) != TCL_OK)
+ || (Tk_GetPixelsFromObj(interp, tkwin, objv[4], &height) != TCL_OK)) {
return TCL_ERROR;
}
wmPtr->minWidth = width;