summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2012-09-25 15:02:22 (GMT)
committerKevin Walzer <kw@codebykevin.com>2012-09-25 15:02:22 (GMT)
commit5cb77a40678b825516b83d6df2c9fdc157a9dece (patch)
tree630f89fd95e52582661ea6b87a65a887848375e1 /macosx
parentd19ad820f2277b5a03acd63da2ecbf2f2c4bd913 (diff)
downloadtk-5cb77a40678b825516b83d6df2c9fdc157a9dece.zip
tk-5cb77a40678b825516b83d6df2c9fdc157a9dece.tar.gz
tk-5cb77a40678b825516b83d6df2c9fdc157a9dece.tar.bz2
Backport of dgp fixes to trunk for Tk-Cocoa
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXFont.c2
-rw-r--r--macosx/tkMacOSXWm.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 67ed044..20b8908 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -885,7 +885,7 @@ TkpMeasureCharsInContext(
/* The call to CTTypesetterSuggestClusterBreak above will always
return at least one character regardless of whether it exceeded
it or not. Clean that up now. */
- while (width > maxWidth && !(flags & TK_PARTIAL_OK) && index > start) {
+ while (width > maxWidth && !(flags & TK_PARTIAL_OK) && index > start(flags & TK_AT_LEAST_ONE)) {
range.length = --index;
line = CTTypesetterCreateLine(typesetter, range);
width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 22c95e9..e56c0e7 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -1641,7 +1641,9 @@ WmForgetCmd(
if (Tk_IsTopLevel(frameWin)) {
- MacDrawable *macWin = (MacDrawable *) winPtr->parentPtr->window;
+ MacDrawable *macWin;
+ Tk_MakeWindowExist(winPtr);
+ Tk_MakeWindowExist(winPtr->parentPtr); macWin = (MacDrawable *) winPtr->window;
TkFocusJoin(winPtr);
Tk_UnmapWindow(frameWin);
TkWmDeadWindow(macWin);