comparison src/w32term.c @ 34779:94c3431a7fe2

(x_draw_hollow_cursor): Delay obtaining the frame's DC to avoid returning without releasing it.
author Jason Rumney <jasonr@gnu.org>
date Thu, 21 Dec 2000 11:06:32 +0000
parents 0322014fcf27
children d140f5fb3307
comparison
equal deleted inserted replaced
34778:662601fb7a07 34779:94c3431a7fe2
8739 x_draw_hollow_cursor (w, row) 8739 x_draw_hollow_cursor (w, row)
8740 struct window *w; 8740 struct window *w;
8741 struct glyph_row *row; 8741 struct glyph_row *row;
8742 { 8742 {
8743 struct frame *f = XFRAME (WINDOW_FRAME (w)); 8743 struct frame *f = XFRAME (WINDOW_FRAME (w));
8744 HDC hdc = get_frame_dc (f); 8744 HDC hdc;
8745 RECT rect; 8745 RECT rect;
8746 int wd; 8746 int wd;
8747 struct glyph *cursor_glyph; 8747 struct glyph *cursor_glyph;
8748 HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel); 8748 HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel);
8749 8749
8768 if (cursor_glyph->type == STRETCH_GLYPH 8768 if (cursor_glyph->type == STRETCH_GLYPH
8769 && !x_stretch_cursor_p) 8769 && !x_stretch_cursor_p)
8770 wd = min (CANON_X_UNIT (f), wd); 8770 wd = min (CANON_X_UNIT (f), wd);
8771 8771
8772 rect.right = rect.left + wd; 8772 rect.right = rect.left + wd;
8773 8773 hdc = get_frame_dc (f);
8774 FrameRect (hdc, &rect, hb); 8774 FrameRect (hdc, &rect, hb);
8775 DeleteObject (hb); 8775 DeleteObject (hb);
8776 8776
8777 release_frame_dc (f, hdc); 8777 release_frame_dc (f, hdc);
8778 } 8778 }