summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-19 01:44:56 (GMT)
committerhobbs <hobbs>2003-07-19 01:44:56 (GMT)
commit8d8cf1bc9be1fb34715f276d60caa62e007ef3e4 (patch)
tree51a8aa107f90820b2ae0585f8744b8d3f9ab2826
parent632cb6c653389ce3ed256e51767310cb85cc9de9 (diff)
downloadtk-8d8cf1bc9be1fb34715f276d60caa62e007ef3e4.zip
tk-8d8cf1bc9be1fb34715f276d60caa62e007ef3e4.tar.gz
tk-8d8cf1bc9be1fb34715f276d60caa62e007ef3e4.tar.bz2
* unix/tkUnixFont.c (Tk_DrawChars): do not make XGetGeometry call
that prevents overwidth lines as it requires a roundtrip call to the X server for every string drawn. Hard-code max width to 32768 until a beter solution to get max width is made.
-rw-r--r--ChangeLog29
-rw-r--r--unix/tkUnixFont.c15
2 files changed, 27 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b4b99f..ff45ed7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,18 @@
2003-07-19 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide
+ consistency between unix and windows -cursor option.
+
* library/scale.tcl: Fix for bug 706765 to correctly handle the
-sliderrelief option while moving the thumb.
2003-07-18 Jeff Hobbs <jeffh@ActiveState.com>
+ * unix/tkUnixFont.c (Tk_DrawChars): do not make XGetGeometry call
+ that prevents overwidth lines as it requires a roundtrip call to
+ the X server for every string drawn. Hard-code max width to 32768
+ until a beter solution to get max width is made.
+
* library/panedwindow.tcl: use widget-specific Priv slots for
pwAfterId and panecursor items to correctly handle cursor changes
with adjacant panedwindows.
@@ -12,13 +20,6 @@
* generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for
TK_XIM_SPOT usage. [Bug 742660] (takahashi)
-2003-07-19 Pat Thoyts <patthoyts@users.sourceforge.net>
-
- * win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide
- consistency between unix and windows -cursor option.
-
-2003-07-18 Jeff Hobbs <jeffh@ActiveState.com>
-
* win/tkWinDialog.c: doubled the TK_MULTI_MAX_PATH value to ~10K.
This is a short-term solution until the -multiple option is
extended. [Bug 641261]
@@ -26,15 +27,15 @@
2003-07-18 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tkWindow.c:
- * macosx/tkMacOSXDialog.c: added native tk_messageBox command,
- (Tk_MessageBoxObjCmd) for MacOS X platform.
+ * macosx/tkMacOSXDialog.c: added native tk_messageBox command,
+ (Tk_MessageBoxObjCmd) for MacOS X platform.
- * macosx/tkMacOSXMenu.c: corrected encoding conversion for
- torn-off menu entries (but many other display problems still
- exist with these)
+ * macosx/tkMacOSXMenu.c: corrected encoding conversion for
+ torn-off menu entries (but many other display problems still
+ exist with these)
- * macosx/tkMacOSXMouseEvent.c: improved handling of events in the
- presence of grabs, particularly activation events.
+ * macosx/tkMacOSXMouseEvent.c: improved handling of events in the
+ presence of grabs, particularly activation events.
2003-07-18 Donal K. Fellows <fellowsd@cs.man.ac.uk>
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index b83bd98..581e727 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixFont.c,v 1.19 2003/05/15 18:05:06 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixFont.c,v 1.20 2003/07/19 01:44:57 hobbs Exp $
*/
#include "tkUnixInt.h"
@@ -1158,19 +1158,21 @@ Tk_DrawChars(display, drawable, gc, tkfont, source, numBytes, x, y)
SubFont *thisSubFontPtr, *lastSubFontPtr;
Tcl_DString runString;
CONST char *p, *end, *next;
- int xStart, needWidth, window_width;
+ int xStart, needWidth, window_width, do_width;
Tcl_UniChar ch;
FontFamily *familyPtr;
+#ifdef TK_DRAW_CHAR_XWINDOW_CHECK
int rx, ry;
unsigned int width, height, border_width, depth;
- int do_width;
Drawable root;
+#endif
fontPtr = (UnixFont *) tkfont;
lastSubFontPtr = &fontPtr->subFontArray[0];
xStart = x;
+#ifdef TK_DRAW_CHAR_XWINDOW_CHECK
/*
* Get the window width so we can abort drawing outside of the window
*/
@@ -1180,6 +1182,13 @@ Tk_DrawChars(display, drawable, gc, tkfont, source, numBytes, x, y)
} else {
window_width = width;
}
+#else
+ /*
+ * This is used by default until we find a solution that doesn't
+ * round-trip to the X server (need to get Tk cached window width).
+ */
+ window_width = 32768;
+#endif
end = source + numBytes;
needWidth = fontPtr->font.fa.underline + fontPtr->font.fa.overstrike;