# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1573791978 0 # Node ID 5ca399fb2d6f58f29bd35aaacf2410a995bb4350 # Parent c4fc33d70a8e12281ebd70310589c638843eb9b5 Mac: Put back the delayed setNeedsDisplay workaround for Mojave only. diff -r c4fc33d70a8e -r 5ca399fb2d6f mac/dw.m --- a/mac/dw.m Fri Nov 15 03:31:17 2019 +0000 +++ b/mac/dw.m Fri Nov 15 04:26:18 2019 +0000 @@ -1121,6 +1121,7 @@ -(void)otherMouseDown:(NSEvent *)theEvent { _event_handler(self, theEvent, 3); } -(void)otherMouseUp:(NSEvent *)theEvent { _event_handler(self, theEvent, 4); } -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } +-(void)delayedNeedsDisplay { [self setNeedsDisplay:YES]; } -(void)drawRect:(NSRect)rect { _event_handler(self, nil, 7); #ifdef BUILDING_FOR_MOJAVE @@ -1128,7 +1129,11 @@ { [cachedDrawingRep drawInRect:self.bounds]; [_DWDirtyDrawables removeObject:self]; - [self setNeedsDisplay:YES]; + /* Work around a bug in Mojave 10.14 by delaying the setNeedsDisplay */ + if(DWOSMinor != 14) + [self setNeedsDisplay:YES]; + else + [self performSelector:@selector(delayedNeedsDisplay) withObject:nil afterDelay:0]; } #endif } @@ -4175,11 +4180,7 @@ /* Display the dialog. If the OK button was pressed, * process the files. */ -#if defined(MAC_OS_X_VERSION_10_9) && ((defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) || !defined(MAC_OS_X_VERSION_MAX_ALLOWED)) - if([saveDlg runModal] == NSModalResponseOK) -#else - if([saveDlg runModal] == NSFileHandlingPanelOKButton) -#endif + if([saveDlg runModal] == DWModalResponseOK) { /* Get an array containing the full filenames of all * files and directories selected.