Fix T64024: monitor/fullscreen switching on macOS shows red line artifacts
This commit is contained in:
parent
804e90b42d
commit
bf361fc9a0
@ -94,16 +94,15 @@
|
||||
- (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
|
||||
{
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@ -114,11 +113,9 @@
|
||||
|
||||
- (void)windowDidExitFullScreen:(NSNotification *)notification
|
||||
{
|
||||
associatedWindow->setImmediateDraw(false);
|
||||
/* 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
|
||||
@ -137,6 +134,7 @@
|
||||
- (void)windowDidChangeBackingProperties:(NSNotification *)notification
|
||||
{
|
||||
systemCocoa->handleWindowEvent(GHOST_kEventNativeResolutionChange, associatedWindow);
|
||||
systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow);
|
||||
}
|
||||
|
||||
- (BOOL)windowShouldClose:(id)sender;
|
||||
|
Loading…
Reference in New Issue
Block a user