* nsterm.m (ns_update_begin): Set clip path to whole view by using
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 10 Sep 2012 21:01:45 +0000 (23:01 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 10 Sep 2012 21:01:45 +0000 (23:01 +0200)
NSBezierPath.

Fixes: debbugs:12131

src/ChangeLog
src/nsterm.m

index 548c80b..4123215 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-10  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (ns_update_begin): Set clip path to whole view by using
+       NSBezierPath (Bug#12131).
+
 2012-09-10  Chong Yidong  <cyd@gnu.org>
 
        * fns.c (Fdelq, Fdelete): Doc fix.
index 74a3d85..798c975 100644 (file)
@@ -627,6 +627,8 @@ ns_update_begin (struct frame *f)
    -------------------------------------------------------------------------- */
 {
   NSView *view = FRAME_NS_VIEW (f);
+  NSRect r = [view frame];
+  NSBezierPath *bp = [NSBezierPath bezierPath];
   NSTRACE (ns_update_begin);
 
   ns_update_auto_hide_menu_bar ();
@@ -634,6 +636,13 @@ ns_update_begin (struct frame *f)
   ns_updating_frame = f;
   [view lockFocus];
 
+  /* drawRect may have been called for say the minibuffer, and then clip path
+     is for the minibuffer.  But the display engine may draw more because
+     we have set the frame as garbaged.  So reset clip path to the whole
+     view.  */
+  [bp appendBezierPathWithRect: r];
+  [bp setClip];
+
 #ifdef NS_IMPL_GNUSTEP
   uRect = NSMakeRect (0, 0, 0, 0);
 #endif