summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXButton.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 9858f88..f3405d7 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -66,6 +66,13 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr);
if ( y > parent_height - 20 || y + widget_height < 0 ) {
return;
}
+
+ 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) {
+ return;
+ }
}
[super drawRect:dirtyRect];
}