From: Peter Jones <pjones@pmade.com>
To: emacs-pretest-bug@gnu.org
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 [thread overview]
Message-ID: <86d4cl32xt.fsf@pmade.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nsterm.m.diff --]
[-- Type: text/x-patch, Size: 1221 bytes --]
--- 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
[-- Attachment #3: Type: text/plain, Size: 1172 bytes --]
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 <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> C-g C-g M-x r e
p o r t - b <tab> <return>
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
next reply other threads:[~2009-03-13 14:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 14:36 Peter Jones [this message]
[not found] <mailman.3118.1237105305.31690.bug-gnu-emacs@gnu.org>
2009-04-04 22:03 ` bug#2658: 23.0.91; [PATCH] Cocoa Port Doesn't Honor cursor-in-non-selected-windows Peter Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86d4cl32xt.fsf@pmade.com \
--to=pjones@pmade.com \
--cc=2658@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).