Update table headers to return the cursor to normal if the window doesn't accept mousemoved events.

This commit is contained in:
Ross Boucher
2010-02-27 12:22:52 -08:00
parent efd699a044
commit 203e0d150b
2 changed files with 4 additions and 10 deletions
+3 -9
View File
@@ -279,14 +279,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
return;
}
/*
else if (type & CPLeftMouseDragged && [_tableView allowsColumnREordering])
{
// Start dragging here
[[CPCursor closedHandCursor] set];
return;
}
*/
[CPApp setTarget:self selector:@selector(trackMouseWithEvent:) forNextEventMatchingMask:CPLeftMouseDraggedMask | CPLeftMouseUpMask | CPLeftMouseDownMask untilDate:nil inMode:nil dequeue:YES];
}
@@ -344,7 +337,8 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
- (void)_updateResizeCursor:(CPEvent)theEvent
{
if (![_tableView allowsColumnResizing])
// never get stuck in resize cursor mode (FIXME take out when we turn on tracking rects)
if (![_tableView allowsColumnResizing] || ([theEvent type] === CPLeftMouseUp && ![[self window] acceptsMouseMovedEvents]))
{
[[CPCursor arrowCursor] set];
return;
+1 -1
View File
@@ -90,7 +90,7 @@ CPLogRegister(CPLogConsole);
[tableView setVerticalMotionCanBeginDrag:NO];
[tableView setDraggingDestinationFeedbackStyle:CPTableViewDropOn];
[tableView registerForDraggedTypes:[CPArray arrayWithObject:tableTestDragType]];
[window1 setAcceptsMouseMovedEvents:YES];
[window1 orderFront:self];
[self newWindow];
[self sourceList];