summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-08 11:20:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-08 11:20:54 (GMT)
commit8d608dd1a21c704661639fd8d43af18fec414d0f (patch)
treef9fabdba09b2efd8fa849595ba52afd4b43194a4
parent4b8bb9766c83c93000160b5aeb3723d90dd95926 (diff)
parent83920326ba5851cad594e6a261205a202b75a338 (diff)
downloadtk-8d608dd1a21c704661639fd8d43af18fec414d0f.zip
tk-8d608dd1a21c704661639fd8d43af18fec414d0f.tar.gz
tk-8d608dd1a21c704661639fd8d43af18fec414d0f.tar.bz2
merge core-8-6-branch
-rw-r--r--generic/tkSelect.c4
-rw-r--r--generic/tkTextDisp.c2
-rw-r--r--macosx/tkMacOSXDialog.c6
-rw-r--r--tests/menu.test2
4 files changed, 7 insertions, 7 deletions
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index 74b3964..4c3bbfd 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -190,8 +190,8 @@ Tk_CreateSelHandler(
* should make a copy for this selPtr.
*/
- unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) +
- ((CommandInfo *)clientData)->cmdLength + 1;
+ unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) + 1 +
+ ((CommandInfo *)clientData)->cmdLength;
selPtr->clientData = ckalloc(cmdInfoLen);
memcpy(selPtr->clientData, clientData, cmdInfoLen);
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 0958986..c04027d 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -7561,7 +7561,7 @@ TkTextCharLayoutProc(
ciPtr = &bciPtr->ci;
} else {
bciPtr = baseCharChunkPtr->clientData;
- ciPtr = ckalloc(sizeof(CharInfo));
+ ciPtr = ckalloc(Tk_Offset(CharInfo, chars) + 1);
baseString = &bciPtr->baseChars;
}
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index ca55c60..42cd1e5 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -755,15 +755,15 @@ Tk_GetSaveFileObjCmd(
[label setBordered:NO];
[label setBezeled:NO];
[label setDrawsBackground:NO];
-
+
NSPopUpButton *popupButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(50.0, 2, 140, 22.0) pullsDown:NO];
[popupButton addItemsWithTitles:saveFileTypes];
[popupButton setAction:@selector(saveFormat:)];
-
+
[accessoryView addSubview:label];
[accessoryView addSubview:popupButton];
[savepanel setAllowedFileTypes:saveFileTypes];
-
+
[savepanel setAccessoryView:accessoryView];
[savepanel setAllowsOtherFileTypes:YES];
}
diff --git a/tests/menu.test b/tests/menu.test
index 479978e..af78947 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -3879,7 +3879,7 @@ test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup {
} -result {1 {a menubar menu cannot be posted}}
test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over it - bug fa32290898} -setup {
-} -constraints {macOrUnix} -body {
+} -constraints {userInteraction} -body {
toplevel .top
ttk::menubutton .top.mb -text "Some menu";
menu .top.mb.m;