devdraw: avoid deadlock on pre-Mojave macOS
This commit is contained in:
parent
dc60de7b64
commit
26c6b25795
1 changed files with 6 additions and 0 deletions
|
|
@ -541,6 +541,11 @@ _flushmemscreen(Rectangle r)
|
|||
return;
|
||||
|
||||
rect = NSMakeRect(r.min.x, r.min.y, Dx(r), Dy(r));
|
||||
|
||||
// This can get blocked behind responding to mouse events,
|
||||
// which need to acquire the zlock, so let go of it during
|
||||
// the flush. Perhaps the waitUntilDone:YES is wrong?
|
||||
zunlock();
|
||||
[appdelegate
|
||||
performSelectorOnMainThread:@selector(callflushimg:)
|
||||
withObject:[NSValue valueWithRect:rect]
|
||||
|
|
@ -548,6 +553,7 @@ _flushmemscreen(Rectangle r)
|
|||
modes:[NSArray arrayWithObjects:
|
||||
NSRunLoopCommonModes,
|
||||
@"waiting image", nil]];
|
||||
zlock();
|
||||
}
|
||||
|
||||
static void drawimg(NSRect, uint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue