/[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.122 by sds, Mon Nov 5 15:02:13 2001 UTC revision 1.123 by jasonr, Wed Nov 7 21:11:00 2001 UTC
# Line 9604  x_display_and_set_cursor (w, on, hpos, v Line 9604  x_display_and_set_cursor (w, on, hpos, v
9604           and speech synthesizers can follow the cursor.  */           and speech synthesizers can follow the cursor.  */
9605        if (active_cursor)        if (active_cursor)
9606          {          {
           HWND hwnd = FRAME_W32_WINDOW (f);  
   
9607            struct glyph * cursor_glyph = get_phys_cursor_glyph (w);            struct glyph * cursor_glyph = get_phys_cursor_glyph (w);
9608            int caret_width = cursor_glyph->pixel_width;            if (cursor_glyph)
9609            w32_system_caret_x              {
9610              = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);                HWND hwnd = FRAME_W32_WINDOW (f);
9611            w32_system_caret_y                int caret_width = cursor_glyph->pixel_width;
9612              = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y)                w32_system_caret_x
9613                 + glyph_row->ascent - w->phys_cursor_ascent);                  = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
9614                  w32_system_caret_y
9615                    = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y)
9616                       + glyph_row->ascent - w->phys_cursor_ascent);
9617    
9618            /* If the size of the active cursor changed, destroy the old                /* If the size of the active cursor changed, destroy the old
9619               system caret.  */                   system caret.  */
9620            if (w32_system_caret_hwnd                if (w32_system_caret_hwnd
9621                && (w32_system_caret_height != w->phys_cursor_height                    && (w32_system_caret_height != w->phys_cursor_height
9622                    || w32_system_caret_width != caret_width))                        || w32_system_caret_width != caret_width))
9623              PostMessage (hwnd, WM_EMACS_DESTROY_CARET, NULL, NULL);                  PostMessage (hwnd, WM_EMACS_DESTROY_CARET, NULL, NULL);
9624    
9625            if (!w32_system_caret_hwnd)                if (!w32_system_caret_hwnd)
9626              {                  {
9627                w32_system_caret_height = w->phys_cursor_height;                    w32_system_caret_height = w->phys_cursor_height;
9628                w32_system_caret_width = caret_width;                    w32_system_caret_width = caret_width;
9629              }                  }
9630    
9631            /* Move the system caret.  */                /* Move the system caret.  */
9632            PostMessage (hwnd, WM_EMACS_TRACK_CARET, NULL, NULL);                PostMessage (hwnd, WM_EMACS_TRACK_CARET, NULL, NULL);
9633                }
9634          }          }
9635    
9636        switch (new_cursor_type)        switch (new_cursor_type)

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.123

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