summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-09-17 13:12:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-09-17 13:12:54 (GMT)
commit4cbb37bc3338750041662ad1d3ef5a9a5f6016b7 (patch)
tree7850e390c8761a9ca92947bebadf1054505229f0
parenta8512fc0800ca93149c86ad526313794ea16be36 (diff)
parenta7ed3710535ad02489545afd8bd9bb587b7cfdd8 (diff)
downloadtk-4cbb37bc3338750041662ad1d3ef5a9a5f6016b7.zip
tk-4cbb37bc3338750041662ad1d3ef5a9a5f6016b7.tar.gz
tk-4cbb37bc3338750041662ad1d3ef5a9a5f6016b7.tar.bz2
merge trunk
-rw-r--r--ChangeLog5
-rw-r--r--changes4
-rw-r--r--generic/tkClipboard.c3
-rw-r--r--macosx/tkMacOSXFont.c3
-rw-r--r--macosx/tkMacOSXWm.c18
-rw-r--r--tests/winWm.test23
-rw-r--r--unix/tkUnixSend.c3
7 files changed, 45 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index c34b77a..e7e1431 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-15 Don Porter <dgp@users.sourceforge.net>
+
+ * macosx/tkMacOSXFont.c: [Bug 3567778] Make Tk_MeasureChars() honor
+ the TK_AT_LEAST_ONE flag properly.
+
2012-09-13 Donal K. Fellows <dkf@users.sf.net>
* generic/ttk/ttkEntry.c (EntryDisplay): [Bug 3567453]: Clip regions
diff --git a/changes b/changes
index 9fd0419..713e745 100644
--- a/changes
+++ b/changes
@@ -7008,6 +7008,10 @@ and -to (porter)
2012-09-11 (bug fix)[3566594] stop clip region leaks (fellows)
+2012-09-15 (bug fix)[3567778] stop hang in wrapped label (porter)
+
+2012-09-17 (bug fix)[3567786] stop segfault in [wm forget] (porter)
+
Many revisions to better support a Cygwin environment (nijtmans)
--- Released 8.6b3, September 18, 2012 --- See ChangeLog for details ---
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index 604fa98..b902625 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -652,6 +652,9 @@ TkClipInit(
dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr,
DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve(dispPtr->clipWindow);
+ ((TkWindow *) dispPtr->clipWindow)->flags |=
+ TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED;
+ TkWmNewWindow((TkWindow *) dispPtr->clipWindow);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts);
Tk_MakeWindowExist(dispPtr->clipWindow);
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index e4e4e03..d800ae5 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -883,7 +883,8 @@ 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 b651b3c..3a1da10 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -726,6 +726,9 @@ TkWmDeadWindow(
if (wmPtr == NULL) {
return;
}
+ Tk_ManageGeometry((Tk_Window) winPtr, NULL, NULL);
+ Tk_DeleteEventHandler((Tk_Window) winPtr, StructureNotifyMask,
+ TopLevelEventProc, winPtr);
if (wmPtr->hints.flags & IconPixmapHint) {
Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap);
}
@@ -1646,12 +1649,21 @@ WmForgetCmd(
register Tk_Window frameWin = (Tk_Window) winPtr;
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((TkWindow *) macWin);
- RemapWindows(winPtr, macWin);
+
+ macWin->toplevel = winPtr->parentPtr->privatePtr->toplevel;
+ macWin->flags &= ~TK_HOST_EXISTS;
+
+ TkWmDeadWindow(winPtr);
+ RemapWindows(winPtr, (MacDrawable *) winPtr->parentPtr->window);
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
diff --git a/tests/winWm.test b/tests/winWm.test
index a4d2669..ad4988d 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -541,25 +541,28 @@ test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -setup
} -body {
pack .t.f.x
pack .t.f
- set aid [after 1000 {set ::winwm92 timeout}]
- after 100 {
+ lappend aid [after 2000 {set ::winwm92 timeout}] [after 100 {
wm manage .t.f
wm iconify .t
- after 100 {
+ lappend aid [after 100 {
wm forget .t.f
wm deiconify .t
- after 100 {
+ lappend aid [after 100 {
pack .t.f
- after 100 {set ::winwm92 [expr {[winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}
- }
- }
- }
+ lappend aid [after 100 {
+ set ::winwm92 [expr {
+ [winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}]
+ }]
+ }]
+ }]
vwait ::winwm92
- after cancel $aid
+ foreach id $aid {
+ after cancel $id
+ }
set winwm92
} -cleanup {
destroy .t.f.x .t.f .t
- unset -nocomplain winwm92 aid
+ unset -nocomplain winwm92 aid id
} -result ok
destroy .t
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 54c3cf2..e3a810d 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -1360,6 +1360,9 @@ SendInit(
dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr,
DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve(dispPtr->commTkwin);
+ ((TkWindow *) dispPtr->commTkwin)->flags |=
+ TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED;
+ TkWmNewWindow((TkWindow *) dispPtr->commTkwin);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->commTkwin,
CWOverrideRedirect, &atts);