From: Jan Djärv Date: Thu, 8 Aug 2013 17:52:00 +0000 (+0200) Subject: * nsterm.m (ns_update_begin): Don't change clip path if it would be X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10bf7f5a3d084050215a0fda1d313c7818801c42;p=emacs.git * nsterm.m (ns_update_begin): Don't change clip path if it would be larger than the NSWindow. Fixes: debbugs:14934 --- diff --git a/src/ChangeLog b/src/ChangeLog index caf7b034401..d57086f7141 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-08-08 Jan Djärv + + * nsterm.m (ns_update_begin): Don't change clip path if it would be + larger than the NSWindow (Bug#14934). + 2013-08-08 Dmitry Antipov Redesign redisplay interface to drop global variable updated_window. diff --git a/src/nsterm.m b/src/nsterm.m index 56572d5b9f4..4a1c04ffb8f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -691,9 +691,18 @@ ns_update_begin (struct frame *f) { NSBezierPath *bp; NSRect r = [view frame]; - bp = [[NSBezierPath bezierPathWithRect: r] retain]; - [bp setClip]; - [bp release]; + NSRect cr = [[view window] frame]; + /* If a large frame size is set, r may be larger than the window frame + before constrained. In that case don't change the clip path, as we + will clear in to the tool bar and title bar. */ + if (r.size.height + + FRAME_NS_TITLEBAR_HEIGHT (f) + + FRAME_TOOLBAR_HEIGHT (f) <= cr.size.height) + { + bp = [[NSBezierPath bezierPathWithRect: r] retain]; + [bp setClip]; + [bp release]; + } } #endif @@ -784,9 +793,9 @@ ns_update_end (struct frame *f) EmacsView *view = FRAME_NS_VIEW (f); /* if (f == MOUSE_HL_INFO (f)->mouse_face_mouse_frame) */ - MOUSE_HL_INFO (f)->mouse_face_defer = 0; + MOUSE_HL_INFO (f)->mouse_face_defer = 0; - block_input (); + block_input (); [view unlockFocus]; [[view window] flushWindow];