summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScrlbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXScrlbr.c')
-rw-r--r--macosx/tkMacOSXScrlbr.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 00f6088..f9a2f5f 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -1,5 +1,5 @@
/*
- * tkMacOSXScrollbar.c --
+ * tkMacOSXScrollbar.c --
*
* This file implements the Macintosh specific portion of the scrollbar
* widget.
@@ -50,15 +50,11 @@ NSRect TkMacOSXGetScrollFrame(TkScrollbar *scrlPtr);
NSRect Tkframe = TkMacOSXGetScrollFrame(scrollPtr);
/* Do not draw if the widget is misplaced or unmapped. */
if ( NSIsEmptyRect(Tkframe) ||
- ! (macWin->winPtr->flags & TK_MAPPED)
+ ! macWin->winPtr->flags & TK_MAPPED ||
+ ! NSEqualRects(Tkframe, [self frame])
) {
return;
}
- for (Tk_Window parent_win = tkwin; parent_win != NULL;parent_win = Tk_Parent(parent_win)) {
- if (!Tk_IsMapped(parent_win)) {
- return;
- }
- }
/*
* Do not draw if the widget is completely outside of its parent.