Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-31 21:26:20 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-31 21:26:20 +0300
commitf9d09a120910a21d383933c15fd72546772b5e81 (patch)
treeaba43105de416afdf376bbf563002f9fd360188f /intern/ghost/intern/GHOST_WindowCocoa.mm
parent4633bb9939cd11a2429aeb2c0e5e3ede311a3126 (diff)
parent57801426792c3ca9c126c3c720ca6f337815294c (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowCocoa.mm')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 6470bb22fef..8c86d92bf75 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -94,6 +94,12 @@
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
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
@@ -109,6 +115,10 @@
- (void)windowDidExitFullScreen:(NSNotification *)notification
{
associatedWindow->setImmediateDraw(false);
+ /* See comment for windowWillEnterFullScreen. */
+ if ([(NSWindow *)associatedWindow->getOSWindow() isZoomed]) {
+ systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow);
+ }
}
- (void)windowDidResize:(NSNotification *)notification