# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1573788677 0 # Node ID c4fc33d70a8e12281ebd70310589c638843eb9b5 # Parent 2cbbbc850b8dfc9fd2a9505561687d835bdbdee4 Mac: Removed delayed setNeedsDisplay:YES to fix the incorrect dwtest file rendering. This is working without proble on Catalina... need to retest on Mojave and perhaps reimplement the delay only for Mojave. diff -r 2cbbbc850b8d -r c4fc33d70a8e dwtest.c --- a/dwtest.c Thu Nov 14 12:08:54 2019 +0000 +++ b/dwtest.c Fri Nov 15 03:31:17 2019 +0000 @@ -1747,7 +1747,7 @@ if(hwndstatus && url && status < 5) { - int length = strlen(url) + strlen(statusnames[status]) + 10; + int length = (int)strlen(url) + (int)strlen(statusnames[status]) + 10; char *text = calloc(1, length+1); snprintf(text, length, "Status %s: %s", statusnames[status], url); @@ -1910,7 +1910,7 @@ dw_signal_connect(mainwindow, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), DW_POINTER(mainwindow)); /* * The following is a special case handler for the Mac and other platforms which contain - * an application object which can be closed. It function identically to a window delete/close + * an application object which can be closed. It functions identically to a window delete/close * request except it applies to the entire application not an individual window. If it is not * handled or you allow the default handler to take place the entire application will close. * On platforms which do not have an application object this line will be ignored. diff -r 2cbbbc850b8d -r c4fc33d70a8e mac/dw.m --- a/mac/dw.m Thu Nov 14 12:08:54 2019 +0000 +++ b/mac/dw.m Fri Nov 15 03:31:17 2019 +0000 @@ -1121,7 +1121,6 @@ -(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 @@ -1129,7 +1128,7 @@ { [cachedDrawingRep drawInRect:self.bounds]; [_DWDirtyDrawables removeObject:self]; - [self performSelector:@selector(delayedNeedsDisplay) withObject:nil afterDelay:0]; + [self setNeedsDisplay:YES]; } #endif } @@ -1296,7 +1295,7 @@ DWRender *rend; while (rend = [enumerator nextObject]) - rend.needsDisplay = YES; + [rend setNeedsDisplay:YES]; [_DWDirtyDrawables removeAllObjects]; #else if(_DWLastDrawable)