* bug#2658: 23.0.91; [PATCH] Cocoa Port Doesn't Honor cursor-in-non-selected-windows
@ 2009-03-13 14:36 Peter Jones
0 siblings, 0 replies; 2+ messages in thread
From: Peter Jones @ 2009-03-13 14:36 UTC (permalink / raw)
To: emacs-pretest-bug
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-04 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2009-03-13 14:36 Peter Jones
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.