| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 // focus fullscreen; this is the result of [NSScreen mainScreen]. | 439 // focus fullscreen; this is the result of [NSScreen mainScreen]. |
| 440 NSScreen* mainScreen = [[NSScreen screens] objectAtIndex:0]; | 440 NSScreen* mainScreen = [[NSScreen screens] objectAtIndex:0]; |
| 441 | 441 |
| 442 self = [super initWithContentRect:[mainScreen frame] | 442 self = [super initWithContentRect:[mainScreen frame] |
| 443 styleMask:NSBorderlessWindowMask | 443 styleMask:NSBorderlessWindowMask |
| 444 backing:NSBackingStoreBuffered | 444 backing:NSBackingStoreBuffered |
| 445 defer:NO | 445 defer:NO |
| 446 screen:mainScreen]; | 446 screen:mainScreen]; |
| 447 if (self) { | 447 if (self) { |
| 448 owner_ = owner; | 448 owner_ = owner; |
| 449 [self setAcceptsMouseMovedEvents:YES]; |
| 449 // We need to set ourselves as the delegate in order to receive | 450 // We need to set ourselves as the delegate in order to receive |
| 450 // focus changed notifications. | 451 // focus changed notifications. |
| 451 [self setDelegate:self]; | 452 [self setDelegate:self]; |
| 452 } | 453 } |
| 453 return self; | 454 return self; |
| 454 } | 455 } |
| 455 | 456 |
| 456 - (BOOL)canBecomeKeyWindow { | 457 - (BOOL)canBecomeKeyWindow { |
| 457 // Needed to receive keyboard events. | 458 // Needed to receive keyboard events. |
| 458 return YES; | 459 return YES; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 693 |
| 693 bool FullscreenWindowMac::Shutdown(const GLint* last_buffer_rect) { | 694 bool FullscreenWindowMac::Shutdown(const GLint* last_buffer_rect) { |
| 694 #ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG | 695 #ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG |
| 695 overlay_window_.reset(); | 696 overlay_window_.reset(); |
| 696 #endif | 697 #endif |
| 697 return true; | 698 return true; |
| 698 } | 699 } |
| 699 | 700 |
| 700 } // namespace o3d | 701 } // namespace o3d |
| 701 | 702 |
| OLD | NEW |