From 16130a58689c3e24a159dbbd7cab000a28511cc7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 10 Sep 2012 23:01:45 +0200 Subject: [PATCH] * nsterm.m (ns_update_begin): Set clip path to whole view by using NSBezierPath. Fixes: debbugs:12131 --- src/ChangeLog | 5 +++++ src/nsterm.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 548c80b3b85..412321563ba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-10 Jan Djärv + + * nsterm.m (ns_update_begin): Set clip path to whole view by using + NSBezierPath (Bug#12131). + 2012-09-10 Chong Yidong * fns.c (Fdelq, Fdelete): Doc fix. diff --git a/src/nsterm.m b/src/nsterm.m index 74a3d858710..798c9758376 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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 -- 2.39.2