From 69a6978fca68eedc4924cdc9b066c662c0e3fea4 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 15 Jan 2008 05:39:40 +0000 Subject: [PATCH] plain don't allow rollover on 10.4, and pushing a button will select a cell on 10.4 (to avoid flashing) --- macosx/TorrentCell.m | 5 +++-- macosx/TorrentTableView.m | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index c78acb7ef..d6309a49f 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -359,6 +359,7 @@ NSTrackingAreaOptions controlOptions = options; if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped])) { + #warning update control view controlOptions |= NSTrackingAssumeInside; [controlView setNeedsDisplayInRect: controlButtonRect]; } @@ -390,12 +391,12 @@ - (void) setControlHover: (BOOL) hover { - fHoverControl = hover; + fHoverControl = [NSApp isOnLeopardOrBetter] ? hover : -1; } - (void) setRevealHover: (BOOL) hover { - fHoverReveal = hover; + fHoverReveal = [NSApp isOnLeopardOrBetter] ? hover : -1; } - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 281edf7d8..72c8a4fa8 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -94,6 +94,9 @@ { [super updateTrackingAreas]; + fMouseControlRow = -1; + fMouseRevealRow = -1; + NSEnumerator * enumerator = [[self trackingAreas] objectEnumerator]; NSTrackingArea * area; while ((area = [enumerator nextObject])) @@ -160,7 +163,8 @@ NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil]; //if pushing a button, don't change the selected rows - if ([self pointInControlRect: point] || [self pointInRevealRect: point] || [self pointInActionRect: point]) + if ([NSApp isOnLeopardOrBetter] && ([self pointInControlRect: point] || [self pointInRevealRect: point] + || [self pointInActionRect: point])) fSelectedIndexes = [[self selectedRowIndexes] retain]; [super mouseDown: event];