From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Jones Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2658: 23.0.91; [PATCH] Cocoa Port Doesn't Honor cursor-in-non-selected-windows Date: Fri, 13 Mar 2009 08:36:14 -0600 Message-ID: <86d4cl32xt.fsf@pmade.com> Reply-To: Peter Jones , 2658@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1236958476 10499 80.91.229.12 (13 Mar 2009 15:34:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2009 15:34:36 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 13 16:35:53 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Li9Q9-00062a-Hv for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2009 16:35:37 +0100 Original-Received: from localhost ([127.0.0.1]:40347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li9On-00086P-9y for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2009 11:34:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Li8vM-0001Ww-Vr for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2009 11:03:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Li8vJ-0001PB-5u for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2009 11:03:48 -0400 Original-Received: from [199.232.76.173] (port=40800 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li8vI-0001Ol-De for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2009 11:03:44 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56474) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li8vH-00086a-Oo for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2009 11:03:44 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2DF3fcC024639; Fri, 13 Mar 2009 08:03:41 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2DEj3g8019147; Fri, 13 Mar 2009 07:45:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Peter Jones Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 13 Mar 2009 14:45:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2658 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123695499817553 (code B ref -1); Fri, 13 Mar 2009 14:45:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Mar 2009 14:36:38 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2DEaYYB017537 for ; Fri, 13 Mar 2009 07:36:35 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:39039 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Li8Uz-0001Fr-LR for emacs-pretest-bug@gnu.org; Fri, 13 Mar 2009 10:36:33 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Li8Uv-0004P5-Iz for emacs-pretest-bug@gnu.org; Fri, 13 Mar 2009 10:36:33 -0400 Original-Received: from pmade.com ([64.92.223.213]:60176) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li8Uv-0004ND-8C for emacs-pretest-bug@gnu.org; Fri, 13 Mar 2009 10:36:29 -0400 Original-Received: from beefy.local.pmade.com (75-166-113-14.hlrn.qwest.net [75.166.113.14]) (authenticated bits=0) by pmade.com (8.13.8/8.13.8) with ESMTP id n2DEaKm2001644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 13 Mar 2009 14:36:21 GMT (envelope-from pjones@pmade.com) X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 13 Mar 2009 11:03:48 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26293 gmane.emacs.pretest.bugs:24119 Archived-At: --=-=-= Attached is a patch that changes the Cocoa (Nextstep) port so that it correctly respects the setting of cursor-in-non-selected-windows. Currently, the Objective-C code forces the cursor in non-selected windows to a hollow box, although the function is called with the correct cursor to draw. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nsterm.m.diff --- src/nsterm.m.orig 2009-03-11 13:17:10.000000000 -0600 +++ src/nsterm.m 2009-03-12 17:18:26.000000000 -0600 @@ -2351,7 +2351,7 @@ int fx, fy, h; struct frame *f = WINDOW_XFRAME (w); struct glyph *phys_cursor_glyph; - int overspill, cursorToDraw; + int overspill; NSTRACE (dumpcursor); //fprintf(stderr, "drawcursor (%d,%d) activep = %d\tonp = %d\tc_type = %d\twidth = %d\n",x,y, active_p,on_p,cursor_type,cursor_width); @@ -2407,8 +2407,7 @@ NSDisableScreenUpdates (); #endif - cursorToDraw = active_p ? cursor_type : HOLLOW_BOX_CURSOR; - switch (cursorToDraw) + switch (cursor_type) { case NO_CURSOR: break; @@ -2425,7 +2424,7 @@ s = r; s.origin.y += lrint (0.75 * s.size.height); s.size.width = min (FRAME_COLUMN_WIDTH (f), s.size.width); - s.size.height = lrint (s.size.height * 0.25); + s.size.height = min (cursor_width, 2); //FIXME(see above) NSRectFill (s); break; case BAR_CURSOR: @@ -2437,7 +2436,7 @@ ns_unfocus (f); /* draw the character under the cursor */ - if (cursorToDraw != NO_CURSOR) + if (cursor_type != NO_CURSOR) draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); #ifdef NS_IMPL_COCOA --=-=-= In GNU Emacs 23.0.91.4 (i386-apple-darwin9.6.0, NS apple-appkit-949.43) of 2009-03-12 on beefy.local Windowing system distributor `Apple', version 10.3.949 configured using `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x RET r e p o r t C-g C-g M-x r e p o r t - b Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. call-interactively: Text is read-only Quit [2 times] Quit --=-=-=--