diff options
author | culler <culler> | 2018-11-04 00:33:15 (GMT) |
---|---|---|
committer | culler <culler> | 2018-11-04 00:33:15 (GMT) |
commit | b236ac696bc5e78bb9aa87505d01d388b1b8cb07 (patch) | |
tree | ebff4425a9a139798d7c44a9bb7bf9f8ab1c8e45 /macosx | |
parent | 73b974ee14234e310fa793c9fa63568481356476 (diff) | |
download | tk-b236ac696bc5e78bb9aa87505d01d388b1b8cb07.zip tk-b236ac696bc5e78bb9aa87505d01d388b1b8cb07.tar.gz tk-b236ac696bc5e78bb9aa87505d01d388b1b8cb07.tar.bz2 |
No need for lockFocusIfCanDraw in 10.13 as long as isDrawing is not set in setFrame.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 674bcb6..19e4ba2 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -833,9 +833,10 @@ ConfigureRestrictProc( #endif /* - * We do not allow recursive calls to drawRect. + * We do not allow recursive calls to drawRect. Only log this + * in 10.14 and higher, where it should not happen. */ - if ([NSApp isDrawing]) { + if ([NSApp isDrawing] && [NSApp macMinorVersion] > 13) { TKLog(@"WARNING: a recursive call to drawRect was aborted."); return; } @@ -920,19 +921,8 @@ ConfigureRestrictProc( HIRect bounds = NSRectToCGRect([self bounds]); HIShapeRef shape = HIShapeCreateWithRect(&bounds); - Bool locked = false; - /* - * On OSX versions below 10.14 we *must* lock focus to enable drawing. - * As of 10.14 this is unnecessary and lockFocusIfCanDraw is deprecated. - */ - if (self != [NSView focusView]) { - locked = [self lockFocusIfCanDraw]; - } [self generateExposeEvents: shape]; [w displayIfNeeded]; - if (locked) { - [self unlockFocus]; - } if ([NSApp macMinorVersion] > 13) { [NSApp setIsDrawing:NO]; } |