(svn r25655) -Fix: [OSX] Mouse cursor wasn't displayed properly after switching to fullscreen on 10.7+. (Based on patch by Maedhros)

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
michi_cc 11 years ago
parent a31be4ce11
commit 6d50b10074

@ -253,6 +253,7 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i
- (void)setDriver:(CocoaSubdriver*)drv;
- (BOOL)windowShouldClose:(id)sender;
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
@end

@ -776,6 +776,14 @@ void cocoaReleaseAutoreleasePool()
{
driver->active = false;
}
/** Window entered fullscreen mode (10.7). */
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification
{
NSPoint loc = [ driver->cocoaview convertPoint:[ [ aNotification object ] mouseLocationOutsideOfEventStream ] fromView:nil ];
BOOL inside = ([ driver->cocoaview hitTest:loc ] == driver->cocoaview);
if (inside) [ driver->cocoaview mouseEntered:NULL ];
}
@end

Loading…
Cancel
Save