From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs Mac port Date: Sun, 14 Apr 2013 15:31:05 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1365922196 15150 80.91.229.3 (14 Apr 2013 06:49:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Apr 2013 06:49:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 14 08:49:57 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1URGl2-0004BM-KY for ged-emacs-devel@m.gmane.org; Sun, 14 Apr 2013 08:49:48 +0200 Original-Received: from localhost ([::1]:60513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URGl2-0001li-Af for ged-emacs-devel@m.gmane.org; Sun, 14 Apr 2013 02:49:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URGkx-0001iU-Re for emacs-devel@gnu.org; Sun, 14 Apr 2013 02:49:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URGkt-00058I-75 for emacs-devel@gnu.org; Sun, 14 Apr 2013 02:49:43 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:54528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URGks-00057f-Ke for emacs-devel@gnu.org; Sun, 14 Apr 2013 02:49:39 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id CDFD4C055D for ; Sun, 14 Apr 2013 15:31:05 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158896 Archived-At: >>>>> On Thu, 11 Apr 2013 18:22:54 +0900, YAMAMOTO Mitsuharu said: > The first update of Emacs 24.3 Mac port 4.x is available from > ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-24.3-mac-4.1.tar.gz > ** Improvements > *** Round frame bottom corners on OS X 10.7 and later, even when > internal-border-width is 0. This change seems to trigger a *platform-independent* display bug. The symptom is that the upper part of the cursor in the echo area is sometimes unerased, especially during isearch in a large buffer. It is due to inconsistency of the values of `cursor_in_echo_area' between the update-time (i.e., drawing accompanied by the current matrix construction) and the expose-time (drawing in response to the Expose event). Both cases may call the function `get_window_cursor_type', which refers to the global variable `cursor_in_echo_area'. But its value might have been changed between the two timings by a typical let-binding of the Lisp variable `cursor-in-echo-area'. The fix should be done in the platform-independent part of course, but unfortunately that seems to become a nontrivial change. For the moment, please use the following workaround that is specific to the Mac port if this bug is annoying for you. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/macappkit.h' *** src/macappkit.h 2013-04-11 09:28:06 +0000 --- src/macappkit.h 2013-04-14 05:52:02 +0000 *************** *** 358,363 **** --- 358,367 ---- /* Whether scrollRect:by: has copied rounded bottom corner area. */ BOOL roundedBottomCornersCopied; + /* XXX: workaround for inconsistency of cursor_in_echo_area values + between update-time and expose-time. */ + BOOL cursorInEchoAreaSaved, savedCursorInEchoArea; + /* Raw key event that is interpreted by intepretKeyEvents:. */ NSEvent *rawKeyEvent; *************** *** 380,385 **** --- 384,390 ---- - (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange; - (void)viewFrameDidChange:(NSNotification *)notification; + - (void)saveCursorInEchoArea; @end /* Class for view in the overlay window of an Emacs frame window. */ === modified file 'src/macappkit.m' *** src/macappkit.m 2013-04-11 09:28:06 +0000 --- src/macappkit.m 2013-04-14 05:52:02 +0000 *************** *** 2784,2789 **** --- 2784,2791 ---- { rect = [emacsView convertRect:rect fromView:nil]; [emacsView setNeedsDisplayInRect:rect]; + if ([emacsView isKindOfClass:[EmacsMainView class]]) + [(EmacsMainView *)emacsView saveCursorInEchoArea]; } } } *************** *** 3864,3870 **** --- 3866,3884 ---- - (void)drawRect:(NSRect)aRect { + BOOL origCursorInEchoArea; + + if (cursorInEchoAreaSaved) + { + origCursorInEchoArea = cursor_in_echo_area; + cursor_in_echo_area = savedCursorInEchoArea; + } [super drawRect:aRect]; + if (cursorInEchoAreaSaved) + { + cursor_in_echo_area = origCursorInEchoArea; + cursorInEchoAreaSaved = NO; + } roundedBottomCornersCopied = NO; } *************** *** 3894,3899 **** --- 3908,3919 ---- } } + - (void)saveCursorInEchoArea + { + cursorInEchoAreaSaved = YES; + savedCursorInEchoArea = cursor_in_echo_area; + } + - (void)setMarkedText:(id)aString { if (markedText == aString)