Commit c8c057de authored by Adrian Robert's avatar Adrian Robert

* nsterm.h (ns_cursor_types,...

* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)(ns_output.current_cursor, ns_output.desired_cursor) (ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR) (FRAME_NEW_CURSOR_COLOR,): Remove. * nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR. (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs enumeration (HOLLOW_BOX_CURSOR, etc.). * nsterm.m (ns_frame_rehighlight): Remove commented code. (draw_window_cursor): Simplify code. (EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't change cursor type. In latter, call rehighlight instead of doing updates manually. (EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use core emacs cursor types. * xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under NS.
parent 2a7bb882
2008-10-02 Adrian Robert <Adrian.B.Robert@gmail.com>
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)
(ns_output.current_cursor, ns_output.desired_cursor)
(ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR)
(FRAME_NEW_CURSOR_COLOR): Remove.
* nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR.
(ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs
enumeration (HOLLOW_BOX_CURSOR, etc.).
* nsterm.m (ns_frame_rehighlight): Remove commented code.
(draw_window_cursor): Simplify code.
(EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't
change cursor type. In latter, call rehighlight instead of doing
updates manually.
(EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use
core emacs cursor types.
* xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under
NS.
2008-10-02 Martin Rudalics <rudalics@gmx.at>
* process.c (Faccept_process_output): Fix doc-string.
......
......@@ -413,8 +413,6 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
}
/* FIXME: adapt to generics */
static void
ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
......@@ -426,8 +424,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
error ("Unknown color");
}
[f->output_data.ns->desired_cursor_color release];
f->output_data.ns->desired_cursor_color = [col retain];
[FRAME_CURSOR_COLOR (f) release];
FRAME_CURSOR_COLOR (f) = [col retain];
if (FRAME_VISIBLE_P (f))
{
......@@ -437,6 +435,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
update_face_from_frame_parameter (f, Qcursor_color, arg);
}
static void
ns_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
......@@ -906,11 +905,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
else if (XTYPE (arg) == Lisp_Symbol)
str = SDATA (SYMBOL_NAME (arg));
else return -1;
if (!strcmp (str, "box")) return filled_box;
if (!strcmp (str, "hollow")) return hollow_box;
if (!strcmp (str, "underscore")) return underscore;
if (!strcmp (str, "bar")) return bar;
if (!strcmp (str, "no")) return no_highlight;
if (!strcmp (str, "box")) return FILLED_BOX_CURSOR;
if (!strcmp (str, "hollow")) return HOLLOW_BOX_CURSOR;
if (!strcmp (str, "hbar")) return HBAR_CURSOR;
if (!strcmp (str, "bar")) return BAR_CURSOR;
if (!strcmp (str, "no")) return NO_CURSOR;
return -1;
}
......@@ -920,12 +919,12 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
{
switch (arg)
{
case filled_box: return Qbox;
case hollow_box: return intern ("hollow");
case underscore: return intern ("underscore");
case bar: return intern ("bar");
case no_highlight:
default: return intern ("no");
case FILLED_BOX_CURSOR: return Qbox;
case HOLLOW_BOX_CURSOR: return intern ("hollow");
case HBAR_CURSOR: return intern ("hbar");
case BAR_CURSOR: return intern ("bar");
case NO_CURSOR:
default: return intern ("no");
}
}
......
......@@ -383,16 +383,6 @@ typedef unsigned long NSUInteger;
========================================================================== */
enum ns_cursor_types
{
no_highlight =0,
filled_box,
hollow_box,
underscore,
bar
};
/* could use list to store these, but rest of emacs has a big infrastructure
for managing a table of bitmap "records" */
struct ns_bitmap_record
......@@ -560,16 +550,14 @@ struct ns_output
#ifdef __OBJC__
EmacsView *view;
id miniimage;
NSColor *current_cursor_color;
NSColor *desired_cursor_color;
NSColor *cursor_color;
NSColor *foreground_color;
NSColor *background_color;
EmacsToolbar *toolbar;
#else
void *view;
void *miniimage;
void *current_cursor_color;
void *desired_cursor_color;
void *cursor_color;
void *foreground_color;
void *background_color;
void *toolbar;
......@@ -599,8 +587,6 @@ struct ns_output
Lisp_Object icon_top;
Lisp_Object icon_left;
enum ns_cursor_types current_cursor, desired_cursor;
unsigned char last_inactive;
/* The size of the extra width currently allotted for vertical
scroll bars, in pixels. */
......@@ -656,12 +642,8 @@ struct x_output
#define FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID)
#define FRAME_NS_VIEW(f) ((f)->output_data.ns->view)
#define FRAME_CURSOR(f) ((f)->output_data.ns->current_cursor)
#define FRAME_CURSOR_COLOR(f) ((f)->output_data.ns->current_cursor_color)
#define FRAME_NEW_CURSOR_COLOR(f) ((f)->output_data.ns->desired_cursor_color)
#define FRAME_NEW_CURSOR(f) ((f)->output_data.ns->desired_cursor)
#define FRAME_CURSOR_COLOR(f) ((f)->output_data.ns->cursor_color)
#define FRAME_POINTER_TYPE(f) ((f)->output_data.ns->current_pointer)
#define FRAME_LAST_INACTIVE(f) ((f)->output_data.ns->last_inactive)
#define FRAME_FONT(f) ((f)->output_data.ns->font)
......
This diff is collapsed.
......@@ -20503,6 +20503,9 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
for (s = head; s; s = s->next)
FRAME_RIF (f)->draw_glyph_string (s);
#ifndef HAVE_NS
/* When focus a sole frame and move horizontally, this sets on_p to 0
causing a failure to erase prev cursor position. */
if (area == TEXT_AREA
&& !row->full_width_p
/* When drawing overlapping rows, only the glyph strings'
......@@ -20519,6 +20522,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
notice_overwritten_cursor (w, TEXT_AREA, x0, x1,
row->y, MATRIX_ROW_BOTTOM_Y (row));
}
#endif
/* Value is the x-position up to which drawn, relative to AREA of W.
This doesn't include parts drawn because of overhangs. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment