[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c
From: |
Andrew Choi |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c |
Date: |
Mon, 24 Mar 2003 14:59:10 -0500 |
Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.820 emacs/src/xdisp.c:1.821
*** emacs/src/xdisp.c:1.820 Sun Mar 23 22:32:51 2003
--- emacs/src/xdisp.c Mon Mar 24 14:59:08 2003
***************
*** 198,203 ****
--- 198,205 ----
#endif
#ifdef MAC_OS
#include "macterm.h"
+
+ Cursor No_Cursor;
#endif
#ifndef FRAME_X_OUTPUT
***************
*** 18341,18349 ****
hpos, hpos + len,
DRAW_NORMAL_TEXT, 0);
- #ifndef HAVE_CARBON
- /* ++KFS: Why not on MAC ? */
-
/* Invalidate old phys cursor if the glyph at its hpos is redrawn. */
if (updated_area == TEXT_AREA
&& updated_window->phys_cursor_on_p
--- 18343,18348 ----
***************
*** 18351,18357 ****
&& updated_window->phys_cursor.hpos >= hpos
&& updated_window->phys_cursor.hpos < hpos + len)
updated_window->phys_cursor_on_p = 0;
- #endif
UNBLOCK_INPUT;
--- 18350,18355 ----
***************
*** 18710,18725 ****
enum glyph_row_area area;
int x0, y0, x1, y1;
{
- #ifdef HAVE_CARBON
- /* ++KFS: Why is there a special version of this for the mac ? */
- if (area == TEXT_AREA
- && w->phys_cursor_on_p
- && y0 <= w->phys_cursor.y
- && y1 >= w->phys_cursor.y + w->phys_cursor_height
- && x0 <= w->phys_cursor.x
- && (x1 < 0 || x1 > w->phys_cursor.x))
- w->phys_cursor_on_p = 0;
- #else
if (area == TEXT_AREA && w->phys_cursor_on_p)
{
int cx0 = w->phys_cursor.x;
--- 18708,18713 ----
***************
*** 18750,18756 ****
w->phys_cursor_on_p = 0;
}
}
- #endif
}
#endif /* HAVE_WINDOW_SYSTEM */
--- 18738,18743 ----
***************
*** 18834,18849 ****
hl, 0);
w->phys_cursor_on_p = on_p;
- #ifndef HAVE_CARBON
- /* ++KFS: MAC version did not adjust phys_cursor_width (bug?) */
if (hl == DRAW_CURSOR)
w->phys_cursor_width = x1 - w->phys_cursor.x;
- else
- #endif
/* When we erase the cursor, and ROW is overlapped by other
rows, make sure that these overlapping parts of other rows
are redrawn. */
! if (hl == DRAW_NORMAL_TEXT && row->overlapped_p)
{
if (row > w->current_matrix->rows
&& MATRIX_ROW_OVERLAPS_SUCC_P (row - 1))
--- 18821,18832 ----
hl, 0);
w->phys_cursor_on_p = on_p;
if (hl == DRAW_CURSOR)
w->phys_cursor_width = x1 - w->phys_cursor.x;
/* When we erase the cursor, and ROW is overlapped by other
rows, make sure that these overlapping parts of other rows
are redrawn. */
! else if (hl == DRAW_NORMAL_TEXT && row->overlapped_p)
{
if (row > w->current_matrix->rows
&& MATRIX_ROW_OVERLAPS_SUCC_P (row - 1))
***************
*** 19497,19586 ****
}
- #ifdef HAVE_CARBON
-
- /* ++KFS: Why does MAC have its own version here? Looks like OLD CODE!! */
-
- /* Take proper action when mouse has moved to the mode or header line of
- window W, x-position X. MODE_LINE_P non-zero means mouse is on the
- mode line. X is relative to the start of the text display area of
- W, so the width of fringes and scroll bars must be subtracted
- to get a position relative to the start of the mode line. */
-
- static void
- note_mode_line_highlight (w, x, mode_line_p)
- struct window *w;
- int x, mode_line_p;
- {
- struct frame *f = XFRAME (w->frame);
- struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
- Cursor *cursor = dpyinfo->vertical_scroll_bar_cursor;
- struct glyph_row *row;
-
- if (mode_line_p)
- row = MATRIX_MODE_LINE_ROW (w->current_matrix);
- else
- row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
-
- if (row->enabled_p)
- {
- struct glyph *glyph, *end;
- Lisp_Object help, map;
- int x0;
-
- /* Find the glyph under X. */
- glyph = row->glyphs[TEXT_AREA];
- end = glyph + row->used[TEXT_AREA];
- x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)
- + FRAME_X_LEFT_FRINGE_WIDTH (f));
-
- while (glyph < end
- && x >= x0 + glyph->pixel_width)
- {
- x0 += glyph->pixel_width;
- ++glyph;
- }
-
- if (glyph < end
- && STRINGP (glyph->object)
- && STRING_INTERVALS (glyph->object)
- && glyph->charpos >= 0
- && glyph->charpos < SCHARS (glyph->object))
- {
- /* If we're on a string with `help-echo' text property,
- arrange for the help to be displayed. This is done by
- setting the global variable help_echo_string to the help
- string. */
- help = Fget_text_property (make_number (glyph->charpos),
- Qhelp_echo, glyph->object);
- if (!NILP (help))
- {
- help_echo_string = help;
- XSETWINDOW (help_echo_window, w);
- help_echo_object = glyph->object;
- help_echo_pos = glyph->charpos;
- }
-
- /* Change the mouse pointer according to what is under X/Y. */
- map = Fget_text_property (make_number (glyph->charpos),
- Qlocal_map, glyph->object);
- if (KEYMAPP (map))
- cursor = f->output_data.mac->nontext_cursor;
- else
- {
- map = Fget_text_property (make_number (glyph->charpos),
- Qkeymap, glyph->object);
- if (KEYMAPP (map))
- cursor = f->output_data.mac->nontext_cursor;
- }
- }
- }
-
- rif->define_frame_cursor (f, cursor);
- }
-
- #else
-
/* Take proper action when mouse has moved to the mode or header line
or marginal area AREA of window W, x-position X and y-position Y.
X is relative to the start of the text display area of W, so the
--- 19480,19485 ----
***************
*** 19631,19638 ****
rif->define_frame_cursor (f, cursor);
}
- #endif /* !HAVE_CARBON */
-
/* EXPORT:
Take proper action when the mouse has moved to position X, Y on
--- 19530,19535 ----
***************
*** 19702,19717 ****
return;
}
- #ifdef HAVE_CARBON
- /* ++KFS: Why does MAC have its own version here? Looks like OLD CODE!! */
-
- /* Mouse is on the mode or header line? */
- if (part == ON_MODE_LINE || part == ON_HEADER_LINE)
- {
- note_mode_line_highlight (w, x, part == ON_MODE_LINE);
- return;
- }
- #else
/* Mouse is on the mode, header line or margin? */
if (part == ON_MODE_LINE || part == ON_HEADER_LINE
|| part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
--- 19599,19604 ----
***************
*** 19719,19725 ****
note_mode_line_or_margin_highlight (w, x, y, part);
return;
}
- #endif
if (part == ON_VERTICAL_BORDER)
cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
--- 19606,19611 ----
***************
*** 20087,20093 ****
--- 19973,19983 ----
set_cursor:
+ #ifndef HAVE_CARBON
if (cursor != No_Cursor)
+ #else
+ if (bcmp (&cursor, &No_Cursor, sizeof (Cursor)))
+ #endif
rif->define_frame_cursor (f, cursor);
}
- [Emacs-diffs] Changes to emacs/src/xdisp.c, (continued)
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/16
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Juanma Barranquero, 2003/03/16
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Stefan Monnier, 2003/03/17
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/18
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Jan Djärv, 2003/03/22
- [Emacs-diffs] Changes to emacs/src/xdisp.c, John Paul Wallington, 2003/03/23
- [Emacs-diffs] Changes to emacs/src/xdisp.c,
Andrew Choi <=
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Jan Djärv, 2003/03/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M. Stallman, 2003/03/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Stefan Monnier, 2003/03/28
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Andreas Schwab, 2003/03/30