From: Alan Third Date: Wed, 4 Mar 2020 20:51:40 +0000 (+0000) Subject: Fix more NS_DRAW_TO_BUFFER #ifdefs (bug#39883) X-Git-Tag: emacs-28.0.90~7802 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1bbd32dba392f2fb4548d892354e78ff8df4451;p=emacs.git Fix more NS_DRAW_TO_BUFFER #ifdefs (bug#39883) * src/nsterm.m (ns_update_end): Make sure the frame is updated after drawing. (ns_focus): (ns_unfocus): Should be checking on NS_DRAW_TO_BUFFER rather than if it's Cocoa or GNUstep. --- diff --git a/src/nsterm.m b/src/nsterm.m index 8e256149220..851a5617d7b 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1141,6 +1141,7 @@ ns_update_end (struct frame *f) #ifdef NS_DRAW_TO_BUFFER [NSGraphicsContext setCurrentContext:nil]; + [view setNeedsDisplay:YES]; #else block_input (); @@ -1194,12 +1195,6 @@ ns_focus (struct frame *f, NSRect *r, int n) /* clipping */ if (r) { -#ifdef NS_IMPL_COCOA - int i; - for (i = 0 ; i < n ; i++) - [view setNeedsDisplayInRect:r[i]]; -#endif - [[NSGraphicsContext currentContext] saveGraphicsState]; if (n == 2) NSRectClipList (r, 2); @@ -1224,7 +1219,9 @@ ns_unfocus (struct frame *f) gsaved = NO; } -#ifdef NS_IMPL_GNUSTEP +#ifdef NS_DRAW_TO_BUFFER + [FRAME_NS_VIEW (f) setNeedsDisplay:YES]; +#else if (f != ns_updating_frame) { if (focus_view != NULL)