/[emacs]/emacs/src/w32term.c
ViewVC logotype

Diff of /emacs/src/w32term.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.119 by gerd, Wed Oct 24 09:12:13 2001 UTC revision 1.120 by jasonr, Sat Oct 27 22:21:24 2001 UTC
# Line 214  struct frame *pending_autoraise_frame; Line 214  struct frame *pending_autoraise_frame;
214    
215  struct cursor_pos output_cursor;  struct cursor_pos output_cursor;
216    
217    /* The handle of the frame that currently owns the system caret.  */
218    HWND w32_system_caret_hwnd;
219    int w32_system_caret_width;
220    int w32_system_caret_height;
221    int w32_system_caret_x;
222    int w32_system_caret_y;
223    
224  /* Flag to enable Unicode output in case users wish to use programs  /* Flag to enable Unicode output in case users wish to use programs
225     like Twinbridge on '95 rather than installed system level support     like Twinbridge on '95 rather than installed system level support
226     for Far East languages.  */     for Far East languages.  */
# Line 6460  note_mouse_highlight (f, x, y) Line 6467  note_mouse_highlight (f, x, y)
6467    if (!WINDOWP (window))    if (!WINDOWP (window))
6468      return;      return;
6469    
6470      /* Reset help_echo. It will get recomputed below.  */
6471      help_echo = Qnil;
6472    
6473    /* Convert to window-relative pixel coordinates.  */    /* Convert to window-relative pixel coordinates.  */
6474    w = XWINDOW (window);    w = XWINDOW (window);
6475    frame_to_window_pixel_xy (w, &x, &y);    frame_to_window_pixel_xy (w, &x, &y);
# Line 9482  x_display_and_set_cursor (w, on, hpos, v Line 9492  x_display_and_set_cursor (w, on, hpos, v
9492    struct glyph_matrix *current_glyphs;    struct glyph_matrix *current_glyphs;
9493    struct glyph_row *glyph_row;    struct glyph_row *glyph_row;
9494    struct glyph *glyph;    struct glyph *glyph;
9495      int active_cursor = 1;
9496    
9497    /* This is pointless on invisible frames, and dangerous on garbaged    /* This is pointless on invisible frames, and dangerous on garbaged
9498       windows and frames; in the latter case, the frame or window may       windows and frames; in the latter case, the frame or window may
# Line 9525  x_display_and_set_cursor (w, on, hpos, v Line 9536  x_display_and_set_cursor (w, on, hpos, v
9536        if (w == XWINDOW (echo_area_window))        if (w == XWINDOW (echo_area_window))
9537          new_cursor_type = FRAME_DESIRED_CURSOR (f);          new_cursor_type = FRAME_DESIRED_CURSOR (f);
9538        else        else
9539          new_cursor_type = HOLLOW_BOX_CURSOR;          {
9540              new_cursor_type = HOLLOW_BOX_CURSOR;
9541              active_cursor = 0;
9542            }
9543      }      }
9544    else    else
9545      {      {
# Line 9533  x_display_and_set_cursor (w, on, hpos, v Line 9547  x_display_and_set_cursor (w, on, hpos, v
9547            || w != XWINDOW (f->selected_window))            || w != XWINDOW (f->selected_window))
9548          {          {
9549            extern int cursor_in_non_selected_windows;            extern int cursor_in_non_selected_windows;
9550              active_cursor = 0;
9551    
9552            if (MINI_WINDOW_P (w)            if (MINI_WINDOW_P (w)
9553                || !cursor_in_non_selected_windows                || !cursor_in_non_selected_windows
# Line 9581  x_display_and_set_cursor (w, on, hpos, v Line 9596  x_display_and_set_cursor (w, on, hpos, v
9596        w->phys_cursor_type = new_cursor_type;        w->phys_cursor_type = new_cursor_type;
9597        w->phys_cursor_on_p = 1;        w->phys_cursor_on_p = 1;
9598    
9599          /* If this is the active cursor, we need to track it with the
9600             system caret, so third party software like screen magnifiers
9601             and speech synthesizers can follow the cursor.  */
9602          if (active_cursor)
9603            {
9604              HWND hwnd = FRAME_W32_WINDOW (f);
9605    
9606              struct glyph * cursor_glyph = get_phys_cursor_glyph (w);
9607              int caret_width = cursor_glyph->pixel_width;
9608              w32_system_caret_x
9609                = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
9610              w32_system_caret_y
9611                = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y)
9612                   + glyph_row->ascent - w->phys_cursor_ascent);
9613    
9614              /* If the size of the active cursor changed, destroy the old
9615                 system caret.  */
9616              if (w32_system_caret_hwnd
9617                  && (w32_system_caret_height != w->phys_cursor_height
9618                      || w32_system_caret_width != caret_width))
9619                PostMessage (hwnd, WM_EMACS_DESTROY_CARET, NULL, NULL);
9620    
9621              if (!w32_system_caret_hwnd)
9622                {
9623                  w32_system_caret_height = w->phys_cursor_height;
9624                  w32_system_caret_width = caret_width;
9625                }
9626    
9627              /* Move the system caret.  */
9628              PostMessage (hwnd, WM_EMACS_TRACK_CARET, NULL, NULL);
9629            }
9630    
9631        switch (new_cursor_type)        switch (new_cursor_type)
9632          {          {
9633          case HOLLOW_BOX_CURSOR:          case HOLLOW_BOX_CURSOR:
# Line 10786  w32_initialize () Line 10833  w32_initialize ()
10833                                     off the bottom */                                     off the bottom */
10834    baud_rate = 19200;    baud_rate = 19200;
10835    
10836      w32_system_caret_hwnd = NULL;
10837      w32_system_caret_height = 0;
10838      w32_system_caret_width = 0;
10839      w32_system_caret_x = 0;
10840      w32_system_caret_y = 0;
10841    
10842    last_tool_bar_item = -1;    last_tool_bar_item = -1;
10843    any_help_event_p = 0;    any_help_event_p = 0;
10844    

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26