mirror of https://github.com/OpenTTD/OpenTTD
(svn r25655) -Fix: [OSX] Mouse cursor wasn't displayed properly after switching to fullscreen on 10.7+. (Based on patch by Maedhros)
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…
Reference in New Issue