* window.h (struct window): Prefer enum text_cursor_kinds to int
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 2 Oct 2013 12:08:27 +0000 (16:08 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Wed, 2 Oct 2013 12:08:27 +0000 (16:08 +0400)
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.

src/ChangeLog
src/window.c
src/window.h

index 14519f8..1c4a06e 100644 (file)
@@ -1,3 +1,10 @@
+2013-10-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * 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  <dmantipov@yandex.ru>
 
        * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
index 9673070..647a0b8 100644 (file)
@@ -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;
 
index 6d2478e..cc4332c 100644 (file)
@@ -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;