summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-11-12 23:54:39 (GMT)
committerhobbs <hobbs>2004-11-12 23:54:39 (GMT)
commit367fbdef6e6e6fdc6bb35ee5551636d90cb65156 (patch)
treed72799fa91f5d07ba82a48339c36a245adc04a20 /generic/tkCmds.c
parent73bd79f82489dd61c1ec8a3753e659684b70c645 (diff)
downloadtk-367fbdef6e6e6fdc6bb35ee5551636d90cb65156.zip
tk-367fbdef6e6e6fdc6bb35ee5551636d90cb65156.tar.gz
tk-367fbdef6e6e6fdc6bb35ee5551636d90cb65156.tar.bz2
* generic/tkCmds.c (Tk_TkObjCmd): use correct screen data when
-displayof arg is passed to [tk scaling]. [Bug 800178]
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r--generic/tkCmds.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index c9d684e..d8c91b1 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCmds.c,v 1.31.2.1 2004/06/29 23:20:26 hobbs Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.31.2.2 2004/11/12 23:54:54 hobbs Exp $
*/
#include "tkPort.h"
@@ -755,12 +755,11 @@ Tk_TkObjCmd(clientData, interp, objc, objv)
return TCL_ERROR;
}
- screenPtr = Tk_Screen(tkwin);
-
skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin);
if (skip < 0) {
return TCL_ERROR;
}
+ screenPtr = Tk_Screen(tkwin);
if (objc - skip == 2) {
d = 25.4 / 72;
d *= WidthOfScreen(screenPtr);
@@ -789,7 +788,7 @@ Tk_TkObjCmd(clientData, interp, objc, objv)
break;
}
case TK_USE_IM: {
- TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
+ TkDisplay *dispPtr;
int skip;
if (Tcl_IsSafe(interp)) {
@@ -802,9 +801,8 @@ Tk_TkObjCmd(clientData, interp, objc, objv)
skip = TkGetDisplayOf(interp, objc-2, objv+2, &tkwin);
if (skip < 0) {
return TCL_ERROR;
- } else if (skip) {
- dispPtr = ((TkWindow *) tkwin)->dispPtr;
}
+ dispPtr = ((TkWindow *) tkwin)->dispPtr;
if ((objc - skip) == 3) {
/*
* In the case where TK_USE_INPUT_METHODS is not defined,