diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 88317f88393..bf175bbd188 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -8411,13 +8411,16 @@ not_in_argv (NSString *arg) | |||
| 8411 | { | 8411 | { |
| 8412 | NSTRACE ("EmacsView windowDidChangeBackingProperties:]"); | 8412 | NSTRACE ("EmacsView windowDidChangeBackingProperties:]"); |
| 8413 | 8413 | ||
| 8414 | NSRect frame = [self frame]; | 8414 | if ([self wantsUpdateLayer]) |
| 8415 | { | ||
| 8416 | NSRect frame = [self frame]; | ||
| 8415 | 8417 | ||
| 8416 | [surface release]; | 8418 | [surface release]; |
| 8417 | surface = nil; | 8419 | surface = nil; |
| 8418 | 8420 | ||
| 8419 | ns_clear_frame (emacsframe); | 8421 | ns_clear_frame (emacsframe); |
| 8420 | expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame)); | 8422 | expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame)); |
| 8423 | } | ||
| 8421 | } | 8424 | } |
| 8422 | #endif /* NS_DRAW_TO_BUFFER */ | 8425 | #endif /* NS_DRAW_TO_BUFFER */ |
| 8423 | 8426 | ||
| @@ -8480,7 +8483,7 @@ not_in_argv (NSString *arg) | |||
| 8480 | } | 8483 | } |
| 8481 | 8484 | ||
| 8482 | 8485 | ||
| 8483 | #ifdef NS_IMPL_COCOA | 8486 | #ifdef NS_DRAW_TO_BUFFER |
| 8484 | /* If the frame has been garbaged but the toolkit wants to draw, for | 8487 | /* If the frame has been garbaged but the toolkit wants to draw, for |
| 8485 | example when resizing the frame, we end up with a blank screen. | 8488 | example when resizing the frame, we end up with a blank screen. |
| 8486 | Sometimes this results in an unpleasant flicker, so try to | 8489 | Sometimes this results in an unpleasant flicker, so try to |
| @@ -8488,7 +8491,8 @@ not_in_argv (NSString *arg) | |||
| 8488 | - (void)viewWillDraw | 8491 | - (void)viewWillDraw |
| 8489 | { | 8492 | { |
| 8490 | if (FRAME_GARBAGED_P (emacsframe) | 8493 | if (FRAME_GARBAGED_P (emacsframe) |
| 8491 | && !redisplaying_p) | 8494 | && !redisplaying_p |
| 8495 | && [self wantsUpdateLayer]) | ||
| 8492 | { | 8496 | { |
| 8493 | /* If there is IO going on when redisplay is run here Emacs | 8497 | /* If there is IO going on when redisplay is run here Emacs |
| 8494 | crashes. I think it's because this code will always be run | 8498 | crashes. I think it's because this code will always be run |
| @@ -8505,10 +8509,8 @@ not_in_argv (NSString *arg) | |||
| 8505 | waiting_for_input = owfi; | 8509 | waiting_for_input = owfi; |
| 8506 | } | 8510 | } |
| 8507 | } | 8511 | } |
| 8508 | #endif | ||
| 8509 | 8512 | ||
| 8510 | 8513 | ||
| 8511 | #ifdef NS_DRAW_TO_BUFFER | ||
| 8512 | - (BOOL)wantsUpdateLayer | 8514 | - (BOOL)wantsUpdateLayer |
| 8513 | { | 8515 | { |
| 8514 | #if MAC_OS_X_VERSION_MIN_REQUIRED < 101400 | 8516 | #if MAC_OS_X_VERSION_MIN_REQUIRED < 101400 |