Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowCocoa.mm
| Context not available. | |||||
| - (void)windowWillEnterFullScreen:(NSNotification *)notification | - (void)windowWillEnterFullScreen:(NSNotification *)notification | ||||
| { | { | ||||
| associatedWindow->setImmediateDraw(true); | associatedWindow->setImmediateDraw(true); | ||||
| /* macOS does not send a window resize event when switching between zoomed | |||||
| * and fullscreen, when automatic show/hide of dock and menu bar are enabled. | |||||
| * Send our own to prevent artifacts. */ | |||||
| if ([(NSWindow *)associatedWindow->getOSWindow() isZoomed]) { | |||||
| systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); | |||||
| } | |||||
| } | } | ||||
| - (void)windowDidEnterFullScreen:(NSNotification *)notification | - (void)windowDidEnterFullScreen:(NSNotification *)notification | ||||
| { | { | ||||
| /* macOS does not send a window resize event when switching between zoomed | |||||
| * and fullscreen, when automatic show/hide of dock and menu bar are enabled. | |||||
| * Send our own to prevent artifacts. */ | |||||
| systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); | |||||
| associatedWindow->setImmediateDraw(false); | associatedWindow->setImmediateDraw(false); | ||||
| } | } | ||||
| Context not available. | |||||
| - (void)windowDidExitFullScreen:(NSNotification *)notification | - (void)windowDidExitFullScreen:(NSNotification *)notification | ||||
| { | { | ||||
| associatedWindow->setImmediateDraw(false); | |||||
| /* See comment for windowWillEnterFullScreen. */ | /* See comment for windowWillEnterFullScreen. */ | ||||
| if ([(NSWindow *)associatedWindow->getOSWindow() isZoomed]) { | systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); | ||||
| systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); | |||||
| } | associatedWindow->setImmediateDraw(false); | ||||
| } | } | ||||
| - (void)windowDidResize:(NSNotification *)notification | - (void)windowDidResize:(NSNotification *)notification | ||||
| Context not available. | |||||
| - (void)windowDidChangeBackingProperties:(NSNotification *)notification | - (void)windowDidChangeBackingProperties:(NSNotification *)notification | ||||
| { | { | ||||
| systemCocoa->handleWindowEvent(GHOST_kEventNativeResolutionChange, associatedWindow); | systemCocoa->handleWindowEvent(GHOST_kEventNativeResolutionChange, associatedWindow); | ||||
| systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); | |||||
| } | } | ||||
| - (BOOL)windowShouldClose:(id)sender; | - (BOOL)windowShouldClose:(id)sender; | ||||
| Context not available. | |||||