summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-20 02:19:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-20 02:19:29 (GMT)
commit3c572fdc99da5f79278da0032f47352987f024c0 (patch)
treee13c5d3ab4fe0e4e99cfa5b1d44ecb1d55dd4fd1
parent07b9a8ea4f38e01171560970fccd6b8e30a636df (diff)
parent3154ae189ac42d8b0398d394adb7bc038a3a7ad9 (diff)
downloadtk-3c572fdc99da5f79278da0032f47352987f024c0.zip
tk-3c572fdc99da5f79278da0032f47352987f024c0.tar.gz
tk-3c572fdc99da5f79278da0032f47352987f024c0.tar.bz2
merge trunk
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index f3405d7..adbdda0 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -67,10 +67,11 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr);
return;
}
+ /* Do not draw if the widget is completely outside of its parent, or within 50 pixels of the right border; this prevents buttons from being drawn on peer widgets as scrolling occurs. */
int parent_width = Tk_Width(Tk_Parent(tkwin));
int widget_width = Tk_Width(tkwin);
int x = Tk_X(tkwin);
- if (x > parent_width - 30 || x + widget_width < 0) {
+ if (x > parent_width - 50 || x < 0) {
return;
}
}