Fix slow down when moving between monitors (bug#42834)
* src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]): Recreate the buffer every time.
This commit is contained in:
parent
975acf5737
commit
2129d6b9dc
1 changed files with 5 additions and 13 deletions
18
src/nsterm.m
18
src/nsterm.m
|
@ -8424,25 +8424,17 @@ - (void)focusOnDrawingBuffer
|
|||
|
||||
|
||||
- (void)windowDidChangeBackingProperties:(NSNotification *)notification
|
||||
/* Update the drawing buffer when the backing scale factor changes. */
|
||||
/* Update the drawing buffer when the backing properties change. */
|
||||
{
|
||||
NSTRACE ("EmacsView windowDidChangeBackingProperties:]");
|
||||
|
||||
if (! [self wantsUpdateLayer])
|
||||
return;
|
||||
|
||||
CGFloat old = [[[notification userInfo]
|
||||
objectForKey:@"NSBackingPropertyOldScaleFactorKey"]
|
||||
doubleValue];
|
||||
CGFloat new = [[self window] backingScaleFactor];
|
||||
|
||||
if (old != new)
|
||||
{
|
||||
NSRect frame = [self frame];
|
||||
[self createDrawingBuffer];
|
||||
ns_clear_frame (emacsframe);
|
||||
expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
|
||||
}
|
||||
NSRect frame = [self frame];
|
||||
[self createDrawingBuffer];
|
||||
ns_clear_frame (emacsframe);
|
||||
expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
|
||||
}
|
||||
#endif /* NS_DRAW_TO_BUFFER */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue