Resetting cursor when mouse moves out of browser view.

svn path=/trunk/netsurf/; revision=11839
This commit is contained in:
Sven Weidauer 2011-02-27 10:40:41 +00:00
parent b486dace3b
commit 7e42318684
1 changed files with 6 additions and 1 deletions

View File

@ -168,7 +168,7 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view )
- (void) viewDidMoveToWindow;
{
NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect: [self visibleRect]
options: NSTrackingMouseMoved | NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect
options: NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect
owner: self
userInfo: nil];
[self addTrackingArea: area];
@ -267,6 +267,11 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
browser_window_mouse_track( browser, cocoa_mouse_flags_for_event( theEvent ), location.x, location.y );
}
- (void) mouseExited: (NSEvent *) theEvent;
{
[[NSCursor arrowCursor] set];
}
- (void) keyDown: (NSEvent *)theEvent;
{
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];