summaryrefslogtreecommitdiffstats
path: root/generic/tkTextWind.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-11-15 02:33:47 (GMT)
committervincentdarley <vincentdarley>2003-11-15 02:33:47 (GMT)
commitb741ab86e1086cfbf3dcbd567e7f8e137462a69c (patch)
treeba9e32dbe2f68359525d8a6970e094993a73e5c4 /generic/tkTextWind.c
parent39fcc54153d2d1c3f582c7801f4361e39b85cbff (diff)
downloadtk-b741ab86e1086cfbf3dcbd567e7f8e137462a69c.zip
tk-b741ab86e1086cfbf3dcbd567e7f8e137462a69c.tar.gz
tk-b741ab86e1086cfbf3dcbd567e7f8e137462a69c.tar.bz2
fix two more old text widget bugs
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r--generic/tkTextWind.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index dd829a8..ab0a4e9 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.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: tkTextWind.c,v 1.9 2003/11/07 15:36:27 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.10 2003/11/15 02:33:51 vincentdarley Exp $
*/
#include "tk.h"
@@ -870,18 +870,21 @@ TkTextEmbWinDisplayProc(chunkPtr, x, y, lineHeight, baseline,
TkTextSegment *ewPtr = (TkTextSegment *) chunkPtr->clientData;
int lineX, windowX, windowY, width, height;
Tk_Window tkwin;
-
+ TkText *textPtr;
+
tkwin = ewPtr->body.ew.tkwin;
if (tkwin == NULL) {
return;
}
+
+ textPtr = ewPtr->body.ew.textPtr;
if ((x + chunkPtr->width) <= 0) {
/*
* The window is off-screen; just unmap it.
*/
- if (ewPtr->body.ew.textPtr->tkwin != Tk_Parent(tkwin)) {
- Tk_UnmaintainGeometry(tkwin, ewPtr->body.ew.textPtr->tkwin);
+ if (textPtr->tkwin != Tk_Parent(tkwin)) {
+ Tk_UnmaintainGeometry(tkwin, textPtr->tkwin);
} else {
Tk_UnmapWindow(tkwin);
}
@@ -894,10 +897,10 @@ TkTextEmbWinDisplayProc(chunkPtr, x, y, lineHeight, baseline,
*/
EmbWinBboxProc(chunkPtr, 0, screenY, lineHeight, baseline, &lineX,
- &windowY, &width, &height);
+ &windowY, &width, &height);
windowX = lineX - chunkPtr->x + x;
- if (ewPtr->body.ew.textPtr->tkwin == Tk_Parent(tkwin)) {
+ if (textPtr->tkwin == Tk_Parent(tkwin)) {
if ((windowX != Tk_X(tkwin)) || (windowY != Tk_Y(tkwin))
|| (Tk_ReqWidth(tkwin) != Tk_Width(tkwin))
|| (height != Tk_Height(tkwin))) {
@@ -905,8 +908,8 @@ TkTextEmbWinDisplayProc(chunkPtr, x, y, lineHeight, baseline,
}
Tk_MapWindow(tkwin);
} else {
- Tk_MaintainGeometry(tkwin, ewPtr->body.ew.textPtr->tkwin,
- windowX, windowY, width, height);
+ Tk_MaintainGeometry(tkwin, textPtr->tkwin,
+ windowX, windowY, width, height);
}
/*