]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_window_cursor_type): New arg ACTIVE_CURSOR.
authorKim F. Storm <storm@cua.dk>
Thu, 24 Oct 2002 19:59:14 +0000 (19:59 +0000)
committerKim F. Storm <storm@cua.dk>
Thu, 24 Oct 2002 19:59:14 +0000 (19:59 +0000)
Callers changed (supply dummy arg).

src/macterm.c
src/xdisp.c
src/xterm.c

index 59b41a19e759c56c144050255cb0dfeb416e9d8a..5da54e2c73f1161c0a4a5094d0643738a8b6699e 100644 (file)
@@ -9298,6 +9298,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
   struct frame *f = XFRAME (w->frame);
   int new_cursor_type;
   int new_cursor_width;
+  int active_cursor;
   struct glyph_matrix *current_glyphs;
   struct glyph_row *glyph_row;
   struct glyph *glyph;
@@ -9331,7 +9332,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
   xassert (interrupt_input_blocked);
 
   /* Set new_cursor_type to the cursor we want to be displayed.  */
-  new_cursor_type = get_window_cursor_type (w, &new_cursor_width);
+  new_cursor_type = get_window_cursor_type (w, &new_cursor_width, &active_cursor);
 
 
   /* If cursor is currently being shown and we don't want it to be or
index e3f2ecc134bc8d90b5154cf767f6e3ec73196670..f80c34476246f81310d6b0cf354970693b150d25 100644 (file)
@@ -15288,17 +15288,22 @@ set_frame_cursor_types (f, arg)
 }
 
 
-/* Return the cursor we want to be displayed.  In a mini-buffer
-   window, we want the cursor only to appear if we are reading input
-   from this window.  For the selected window, we want the cursor type
-   given by the frame parameter or buffer local setting of
-   cursor-type.  If explicitly marked off, draw no cursor.  In all
-   other cases, we want a hollow box cursor.  */
+/* Return the cursor we want to be displayed in window W.  Return
+   width of bar/hbar cursor through WIDTH arg.  Return with
+   ACTIVE_CURSOR arg set to 1 if cursor in window W is `active'
+   (i.e. if the `system caret' should track this cursor).
+
+   In a mini-buffer window, we want the cursor only to appear if we
+   are reading input from this window.  For the selected window, we
+   want the cursor type given by the frame parameter or buffer local
+   setting of cursor-type.  If explicitly marked off, draw no cursor.
+   In all other cases, we want a hollow box cursor.  */
 
 enum text_cursor_kinds
-get_window_cursor_type (w, width)
+get_window_cursor_type (w, width, active_cursor)
      struct window *w;
      int *width;
+     int *active_cursor;
 {
   struct frame *f = XFRAME (w->frame);
   struct buffer *b = XBUFFER (w->buffer);
@@ -15306,6 +15311,8 @@ get_window_cursor_type (w, width)
   Lisp_Object alt_cursor;
   int non_selected = 0;
 
+  *active_cursor = 1;
+
   /* Echo area */
   if (cursor_in_echo_area
       && FRAME_HAS_MINIBUF_P (f)
@@ -15317,6 +15324,7 @@ get_window_cursor_type (w, width)
          return FRAME_DESIRED_CURSOR (f);
        }
 
+      *active_cursor = 0;
       non_selected = 1;
     }
 
@@ -15327,6 +15335,8 @@ get_window_cursor_type (w, width)
 #endif
           )
     {
+      *active_cursor = 0;
+
       if (MINI_WINDOW_P (w) && minibuf_level == 0)
        return NO_CURSOR;
 
index 36325e3973dbf06c7e6e51809ca7977d58cfd97b..7d0b6728f068a456bf26d80495648159e732d58f 100644 (file)
@@ -11802,6 +11802,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
   struct frame *f = XFRAME (w->frame);
   int new_cursor_type;
   int new_cursor_width;
+  int active_cursor;
   struct glyph_matrix *current_glyphs;
   struct glyph_row *glyph_row;
   struct glyph *glyph;
@@ -11835,7 +11836,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
   xassert (interrupt_input_blocked);
 
   /* Set new_cursor_type to the cursor we want to be displayed.  */
-  new_cursor_type = get_window_cursor_type (w, &new_cursor_width);
+  new_cursor_type = get_window_cursor_type (w, &new_cursor_width, &active_cursor);
 
   /* If cursor is currently being shown and we don't want it to be or
      it is in the wrong place, or the cursor type is not what we want,