From: Dmitry Antipov Date: Wed, 2 Oct 2013 12:08:27 +0000 (+0400) Subject: * window.h (struct window): Prefer enum text_cursor_kinds to int X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1414 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29bf4de47479ed29ef17736d0a5cadf7e8dae209;p=emacs.git * window.h (struct window): Prefer enum text_cursor_kinds to int for phys_cursor_type member. Move the latter, phys_cursor_width, phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM. * window.c (replace_window, make_window): Adjust users. --- diff --git a/src/ChangeLog b/src/ChangeLog index 14519f874d2..1c4a06ea0f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-10-02 Dmitry Antipov + + * window.h (struct window): Prefer enum text_cursor_kinds to int + for phys_cursor_type member. Move the latter, phys_cursor_width, + phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM. + * window.c (replace_window, make_window): Adjust users. + 2013-10-02 Dmitry Antipov * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because diff --git a/src/window.c b/src/window.c index 967307038f4..647a0b812e9 100644 --- a/src/window.c +++ b/src/window.c @@ -2008,8 +2008,10 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) memset (&n->cursor, 0, sizeof (n->cursor)); memset (&n->phys_cursor, 0, sizeof (n->phys_cursor)); n->last_cursor_vpos = 0; - n->phys_cursor_type = -1; +#ifdef HAVE_WINDOW_SYSTEM + n->phys_cursor_type = NO_CURSOR; n->phys_cursor_width = -1; +#endif n->must_be_updated_p = 0; n->pseudo_window_p = 0; n->window_end_vpos = 0; @@ -3420,8 +3422,10 @@ make_window (void) w->nrows_scale_factor = w->ncols_scale_factor = 1; w->left_fringe_width = w->right_fringe_width = -1; w->mode_line_height = w->header_line_height = -1; - w->phys_cursor_type = -1; +#ifdef HAVE_WINDOW_SYSTEM + w->phys_cursor_type = NO_CURSOR; w->phys_cursor_width = -1; +#endif w->scroll_bar_width = -1; w->column_number_displayed = -1; diff --git a/src/window.h b/src/window.h index 6d2478ecaf9..cc4332ccf7f 100644 --- a/src/window.h +++ b/src/window.h @@ -240,13 +240,19 @@ struct window without pause. This is the position of last_point. */ int last_cursor_vpos; - /* Cursor type and width of last cursor drawn on the window. - Used for X and w32 frames; -1 initially. */ - int phys_cursor_type, phys_cursor_width; +#ifdef HAVE_WINDOW_SYSTEM + + /* Cursor type of last cursor drawn on the window. */ + enum text_cursor_kinds phys_cursor_type; + + /* Width of the cursor above. */ + int phys_cursor_width; /* This is handy for undrawing the cursor. */ int phys_cursor_ascent, phys_cursor_height; +#endif /* HAVE_WINDOW_SYSTEM */ + /* Width of left and right fringes, in pixels. A value of -1 means use frame values. */ int left_fringe_width;