summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-20 02:12:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-20 02:12:58 (GMT)
commit1db32b5fdbbab0e24d8c1346431fc827563c322f (patch)
treecb76b3532e3bca705e1becf9610b78f8bd4956f2
parentc9ecf0793b8a211a2a5835951dfefef6b77cc8b7 (diff)
parentadc51b8ef3945515d44a100acec3794981cae95f (diff)
downloadtk-1db32b5fdbbab0e24d8c1346431fc827563c322f.zip
tk-1db32b5fdbbab0e24d8c1346431fc827563c322f.tar.gz
tk-1db32b5fdbbab0e24d8c1346431fc827563c322f.tar.bz2
merge 8.5
-rw-r--r--macosx/tkMacOSXButton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 58383ca..41436df 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;
}