comparison src/w32term.c @ 30988:a69a2ac4345b

(help_echo_window): New variable. (syms_of_w32term): staticpro it. (note_mode_line_highlight): Set it. (XTextExtents16): Removed as there is no equivalent on W32. (x_compute_glyph_string_overhangs): Incomplete body removed, as the X way of doing this will not work for W32. (w32_intersect_rectangles): Removed. Use IntersectRect API call. (x_draw_image_foreground): Avoid drawing outside of the clip area when image doesn't have a mask. (note_mouse_highlight): Process overlays in the right order of priority. Set help_echo_window. (x_draw_bar_cursor): If cursor is on an image, draw a box cursor because that's more visible for large images.
author Jason Rumney <jasonr@gnu.org>
date Sun, 20 Aug 2000 21:08:43 +0000
parents 460a4e222f17
children 040345be1d12
comparison
equal deleted inserted replaced
30987:36b17174de3b 30988:a69a2ac4345b
159 159
160 /* If a string, w32_read_socket generates an event to display that string. 160 /* If a string, w32_read_socket generates an event to display that string.
161 (The display is done in read_char.) */ 161 (The display is done in read_char.) */
162 162
163 static Lisp_Object help_echo; 163 static Lisp_Object help_echo;
164 static Lisp_Object help_echo_window;
164 static Lisp_Object help_echo_object; 165 static Lisp_Object help_echo_object;
165 static int help_echo_pos; 166 static int help_echo_pos;
166 167
167 /* Temporary variable for w32_read_socket. */ 168 /* Temporary variable for w32_read_socket. */
168 169
381 struct frame *)); 382 struct frame *));
382 static void w32_frame_rehighlight P_ ((struct frame *)); 383 static void w32_frame_rehighlight P_ ((struct frame *));
383 static void x_frame_rehighlight P_ ((struct w32_display_info *)); 384 static void x_frame_rehighlight P_ ((struct w32_display_info *));
384 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); 385 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
385 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int)); 386 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int));
386 static int w32_intersect_rectangles P_ ((RECT *, RECT *, RECT *));
387 static void expose_frame P_ ((struct frame *, int, int, int, int)); 387 static void expose_frame P_ ((struct frame *, int, int, int, int));
388 static void expose_window_tree P_ ((struct window *, RECT *)); 388 static void expose_window_tree P_ ((struct window *, RECT *));
389 static void expose_window P_ ((struct window *, RECT *)); 389 static void expose_window P_ ((struct window *, RECT *));
390 static void expose_area P_ ((struct window *, struct glyph_row *, 390 static void expose_area P_ ((struct window *, struct glyph_row *,
391 RECT *, enum glyph_row_area)); 391 RECT *, enum glyph_row_area));
466 466
467 void XGetGCValues (void* ignore, XGCValues *gc, 467 void XGetGCValues (void* ignore, XGCValues *gc,
468 unsigned long mask, XGCValues *xgcv) 468 unsigned long mask, XGCValues *xgcv)
469 { 469 {
470 XChangeGC (ignore, xgcv, mask, gc); 470 XChangeGC (ignore, xgcv, mask, gc);
471 }
472
473 void XTextExtents16 (XFontStruct *font, wchar_t *text, int nchars,
474 int *direction,int *font_ascent,
475 int *font_descent, XCharStruct *cs)
476 {
477 /* NTEMACS_TODO: Use GetTextMetrics to do this and inline it below. */
478 } 471 }
479 472
480 static void 473 static void
481 w32_set_clip_rectangle (HDC hdc, RECT *rect) 474 w32_set_clip_rectangle (HDC hdc, RECT *rect)
482 { 475 {
1156 if (font->bdf) 1149 if (font->bdf)
1157 font_type = BDF_FONT; 1150 font_type = BDF_FONT;
1158 else if (!w32_enable_unicode_output) 1151 else if (!w32_enable_unicode_output)
1159 font_type = ANSI_FONT; 1152 font_type = ANSI_FONT;
1160 else 1153 else
1161 font_type = UNICODE_FONT; /* NTEMACS_TODO: Need encoding? */ 1154 font_type = UNICODE_FONT;
1162 } 1155 }
1163 1156
1164 pcm = (XCharStruct *) xmalloc (sizeof (XCharStruct)); 1157 pcm = (XCharStruct *) xmalloc (sizeof (XCharStruct));
1165 1158
1166 if (font->hfont) 1159 if (font->hfont)
2646 2639
2647 static INLINE void 2640 static INLINE void
2648 x_compute_glyph_string_overhangs (s) 2641 x_compute_glyph_string_overhangs (s)
2649 struct glyph_string *s; 2642 struct glyph_string *s;
2650 { 2643 {
2651 if (s->cmp == NULL 2644 /* NTEMACS_TODO: Windows does not appear to have a method for
2652 && s->first_glyph->type == CHAR_GLYPH) 2645 getting this info without getting the ABC widths for each
2653 { 2646 individual character and working it out manually. */
2654 XCharStruct cs;
2655 int direction, font_ascent, font_descent;
2656 XTextExtents16 (s->font, s->char2b, s->nchars, &direction,
2657 &font_ascent, &font_descent, &cs);
2658 s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0;
2659 s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0;
2660 }
2661 } 2647 }
2662 2648
2663 2649
2664 /* Compute overhangs and x-positions for glyph string S and its 2650 /* Compute overhangs and x-positions for glyph string S and its
2665 predecessors, or successors. X is the starting x-position for S. 2651 predecessors, or successors. X is the starting x-position for S.
3364 w32_get_glyph_string_clip_rect (s, &clip_rect); 3350 w32_get_glyph_string_clip_rect (s, &clip_rect);
3365 image_rect.x = x; 3351 image_rect.x = x;
3366 image_rect.y = y; 3352 image_rect.y = y;
3367 image_rect.width = s->img->width; 3353 image_rect.width = s->img->width;
3368 image_rect.height = s->img->height; 3354 image_rect.height = s->img->height;
3369 if (w32_intersect_rectangles (&clip_rect, &image_rect, &r)) 3355 if (IntersectRect (&r, &clip_rect, &image_rect))
3370 XCopyArea (s->display, s->img->pixmap, s->window, s->gc, 3356 XCopyArea (s->display, s->img->pixmap, s->window, s->gc,
3371 r.x - x, r.y - y, r.width, r.height, r.x, r.y); 3357 r.x - x, r.y - y, r.width, r.height, r.x, r.y);
3372 } 3358 }
3373 else 3359 else
3374 #endif 3360 #endif
3375 { 3361 {
3376 HDC compat_hdc = CreateCompatibleDC (s->hdc); 3362 HDC compat_hdc = CreateCompatibleDC (s->hdc);
3377 HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground); 3363 HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground);
3378 HBRUSH orig_brush = SelectObject (s->hdc, fg_brush); 3364 HBRUSH orig_brush = SelectObject (s->hdc, fg_brush);
3379 HGDIOBJ orig_obj = SelectObject (compat_hdc, s->img->pixmap); 3365 HGDIOBJ orig_obj = SelectObject (compat_hdc, s->img->pixmap);
3366 x_set_glyph_string_clipping (s);
3380 3367
3381 SetTextColor (s->hdc, s->gc->foreground); 3368 SetTextColor (s->hdc, s->gc->foreground);
3382 SetBkColor (s->hdc, s->gc->background); 3369 SetBkColor (s->hdc, s->gc->background);
3383 #if 0 /* From w32bdf.c (which is from Meadow). */ 3370 #if 0 /* From w32bdf.c (which is from Meadow). */
3384 BitBlt (s->hdc, x, y, s->img->width, s->img->height, 3371 BitBlt (s->hdc, x, y, s->img->width, s->img->height,
3399 the image. I believe it's looking better if we do 3386 the image. I believe it's looking better if we do
3400 nothing here for mouse-face. */ 3387 nothing here for mouse-face. */
3401 if (s->hl == DRAW_CURSOR) 3388 if (s->hl == DRAW_CURSOR)
3402 w32_draw_rectangle (s->hdc, s->gc, x, y, s->img->width - 1, 3389 w32_draw_rectangle (s->hdc, s->gc, x, y, s->img->width - 1,
3403 s->img->height - 1); 3390 s->img->height - 1);
3391 w32_set_clip_rectangle(s->hdc, NULL);
3404 } 3392 }
3405 } 3393 }
3406 else 3394 else
3407 w32_draw_rectangle (s->hdc, s->gc, x, y, s->img->width -1, 3395 w32_draw_rectangle (s->hdc, s->gc, x, y, s->img->width -1,
3408 s->img->height - 1); 3396 s->img->height - 1);
4966 window_rect.left = window_x; 4954 window_rect.left = window_x;
4967 window_rect.top = window_y; 4955 window_rect.top = window_y;
4968 window_rect.right = window_x + window_width; 4956 window_rect.right = window_x + window_width;
4969 window_rect.bottom = window_y + window_height; 4957 window_rect.bottom = window_y + window_height;
4970 4958
4971 if (w32_intersect_rectangles (&r, &window_rect, &intersection_rect)) 4959 if (IntersectRect (&intersection_rect, &r, &window_rect))
4972 expose_window (w, &intersection_rect); 4960 expose_window (w, &intersection_rect);
4973 } 4961 }
4974 } 4962 }
4975 4963
4976 4964
5008 + FRAME_X_FLAGS_AREA_WIDTH (f) 4996 + FRAME_X_FLAGS_AREA_WIDTH (f)
5009 + FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)); 4997 + FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f));
5010 window_rect.bottom = window_rect.top 4998 window_rect.bottom = window_rect.top
5011 + window_height + CURRENT_MODE_LINE_HEIGHT (w); 4999 + window_height + CURRENT_MODE_LINE_HEIGHT (w);
5012 5000
5013 if (w32_intersect_rectangles (r, &window_rect, &intersection_rect)) 5001 if (IntersectRect (&intersection_rect, r, &window_rect))
5014 expose_window (w, &intersection_rect); 5002 expose_window (w, &intersection_rect);
5015 } 5003 }
5016 5004
5017 w = NILP (w->next) ? 0 : XWINDOW (w->next); 5005 w = NILP (w->next) ? 0 : XWINDOW (w->next);
5018 } 5006 }
5126 { 5114 {
5127 cr.left = w->phys_cursor.x; 5115 cr.left = w->phys_cursor.x;
5128 cr.top = w->phys_cursor.y; 5116 cr.top = w->phys_cursor.y;
5129 cr.right = cr.left + cursor_glyph->pixel_width; 5117 cr.right = cr.left + cursor_glyph->pixel_width;
5130 cr.bottom = cr.top + w->phys_cursor_height; 5118 cr.bottom = cr.top + w->phys_cursor_height;
5131 return w32_intersect_rectangles (&cr, r, &result); 5119 return IntersectRect (&result, &cr, r);
5132 } 5120 }
5133 else 5121 else
5134 return 0; 5122 return 0;
5135 } 5123 }
5136 5124
5210 /* Turn the cursor on again. */ 5198 /* Turn the cursor on again. */
5211 if (cursor_cleared_p) 5199 if (cursor_cleared_p)
5212 x_update_window_cursor (w, 1); 5200 x_update_window_cursor (w, 1);
5213 } 5201 }
5214 } 5202 }
5215
5216
5217 /* Determine the intersection of two rectangles R1 and R2. Return
5218 the intersection in *RESULT. Value is non-zero if RESULT is not
5219 empty. */
5220
5221 static int
5222 w32_intersect_rectangles (r1, r2, result)
5223 RECT *r1, *r2, *result;
5224 {
5225 RECT *left, *right;
5226 RECT *upper, *lower;
5227 int intersection_p = 0;
5228
5229 /* Rerrange so that R1 is the left-most rectangle. */
5230 if (r1->left < r2->left)
5231 left = r1, right = r2;
5232 else
5233 left = r2, right = r1;
5234
5235 /* X0 of the intersection is right.x0, if this is inside R1,
5236 otherwise there is no intersection. */
5237 if (right->left <= left->right)
5238 {
5239 result->left = right->left;
5240
5241 /* The right end of the intersection is the minimum of the
5242 the right ends of left and right. */
5243 result->right = min (left->right, right->right);
5244
5245 /* Same game for Y. */
5246 if (r1->top < r2->top)
5247 upper = r1, lower = r2;
5248 else
5249 upper = r2, lower = r1;
5250
5251 /* The upper end of the intersection is lower.y0, if this is inside
5252 of upper. Otherwise, there is no intersection. */
5253 if (lower->top <= upper->bottom)
5254 {
5255 result->top = lower->top;
5256
5257 /* The lower end of the intersection is the minimum of the lower
5258 ends of upper and lower. */
5259 result->bottom = min (lower->bottom, upper->bottom);
5260 intersection_p = 1;
5261 }
5262 }
5263
5264 return intersection_p;
5265 }
5266
5267
5268
5269 5203
5270 5204
5271 static void 5205 static void
5272 frame_highlight (f) 5206 frame_highlight (f)
5273 struct frame *f; 5207 struct frame *f;
5865 help = Fget_text_property (make_number (glyph->charpos), 5799 help = Fget_text_property (make_number (glyph->charpos),
5866 Qhelp_echo, glyph->object); 5800 Qhelp_echo, glyph->object);
5867 if (!NILP (help)) 5801 if (!NILP (help))
5868 { 5802 {
5869 help_echo = help; 5803 help_echo = help;
5804 XSETWINDOW (help_echo_window, w);
5870 help_echo_object = glyph->object; 5805 help_echo_object = glyph->object;
5871 help_echo_pos = glyph->charpos; 5806 help_echo_pos = glyph->charpos;
5872 } 5807 }
5873 5808
5874 /* Change the mouse pointer according to what is under X/Y. */ 5809 /* Change the mouse pointer according to what is under X/Y. */
6018 len = noverlays; 5953 len = noverlays;
6019 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); 5954 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
6020 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL,0); 5955 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL,0);
6021 } 5956 }
6022 5957
5958 /* Sort overlays into increasing priority order. */
6023 noverlays = sort_overlays (overlay_vec, noverlays, w); 5959 noverlays = sort_overlays (overlay_vec, noverlays, w);
6024 5960
6025 /* Check mouse-face highlighting. */ 5961 /* Check mouse-face highlighting. */
6026 if (! (EQ (window, dpyinfo->mouse_face_window) 5962 if (! (EQ (window, dpyinfo->mouse_face_window)
6027 && vpos >= dpyinfo->mouse_face_beg_row 5963 && vpos >= dpyinfo->mouse_face_beg_row
6035 /* Clear the display of the old active region, if any. */ 5971 /* Clear the display of the old active region, if any. */
6036 clear_mouse_face (dpyinfo); 5972 clear_mouse_face (dpyinfo);
6037 5973
6038 /* Find the highest priority overlay that has a mouse-face prop. */ 5974 /* Find the highest priority overlay that has a mouse-face prop. */
6039 overlay = Qnil; 5975 overlay = Qnil;
6040 for (i = 0; i < noverlays; i++) 5976 for (i = noverlays - 1; i >= 0; --i)
6041 { 5977 {
6042 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face); 5978 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face);
6043 if (!NILP (mouse_face)) 5979 if (!NILP (mouse_face))
6044 { 5980 {
6045 overlay = overlay_vec[i]; 5981 overlay = overlay_vec[i];
6121 } 6057 }
6122 } 6058 }
6123 6059
6124 /* Look for a `help-echo' property. */ 6060 /* Look for a `help-echo' property. */
6125 { 6061 {
6126 Lisp_Object help; 6062 Lisp_Object help, overlay;
6127 6063
6128 /* Check overlays first. */ 6064 /* Check overlays first. */
6129 help = Qnil; 6065 help = Qnil;
6130 for (i = 0; i < noverlays && NILP (help); ++i) 6066 for (i = noverlays - 1; i >= 0 && NILP (help); --i)
6131 help = Foverlay_get (overlay_vec[i], Qhelp_echo); 6067 {
6068 overlay = overlay_vec[i];
6069 help = Foverlay_get (overlay, Qhelp_echo);
6070 }
6132 6071
6133 if (!NILP (help)) 6072 if (!NILP (help))
6134 { 6073 {
6135 help_echo = help; 6074 help_echo = help;
6136 help_echo_object = w->buffer; 6075 help_echo_window = window;
6076 help_echo_object = overlay;
6137 help_echo_pos = pos; 6077 help_echo_pos = pos;
6138 } 6078 }
6139 else 6079 else
6140 { 6080 {
6141 /* Try text properties. */ 6081 /* Try text properties. */
6149 Qhelp_echo, glyph->object); 6089 Qhelp_echo, glyph->object);
6150 6090
6151 if (!NILP (help)) 6091 if (!NILP (help))
6152 { 6092 {
6153 help_echo = help; 6093 help_echo = help;
6094 help_echo_window = window;
6154 help_echo_object = glyph->object; 6095 help_echo_object = glyph->object;
6155 help_echo_pos = glyph->charpos; 6096 help_echo_pos = glyph->charpos;
6156 } 6097 }
6157 } 6098 }
6158 } 6099 }
6383 6324
6384 set_help_echo: 6325 set_help_echo:
6385 6326
6386 /* Set help_echo to a help string.to display for this tool-bar item. 6327 /* Set help_echo to a help string.to display for this tool-bar item.
6387 w32_read_socket does the rest. */ 6328 w32_read_socket does the rest. */
6388 help_echo_object = Qnil; 6329 help_echo_object = help_echo_window = Qnil;
6389 help_echo_pos = -1; 6330 help_echo_pos = -1;
6390 help_echo = (XVECTOR (f->current_tool_bar_items) 6331 help_echo = (XVECTOR (f->current_tool_bar_items)
6391 ->contents[prop_idx + TOOL_BAR_ITEM_HELP]); 6332 ->contents[prop_idx + TOOL_BAR_ITEM_HELP]);
6392 if (NILP (help_echo)) 6333 if (NILP (help_echo))
6393 help_echo = (XVECTOR (f->current_tool_bar_items) 6334 help_echo = (XVECTOR (f->current_tool_bar_items)
7699 } 7640 }
7700 break; 7641 break;
7701 7642
7702 case WM_MOUSEMOVE: 7643 case WM_MOUSEMOVE:
7703 previous_help_echo = help_echo; 7644 previous_help_echo = help_echo;
7704 help_echo = Qnil; 7645 help_echo = help_echo_object = help_echo_window = Qnil;
7646 help_echo_pos = -1;
7705 7647
7706 if (dpyinfo->grabbed && last_mouse_frame 7648 if (dpyinfo->grabbed && last_mouse_frame
7707 && FRAME_LIVE_P (last_mouse_frame)) 7649 && FRAME_LIVE_P (last_mouse_frame))
7708 f = last_mouse_frame; 7650 f = last_mouse_frame;
7709 else 7651 else
7730 XSETFRAME (frame, f); 7672 XSETFRAME (frame, f);
7731 else 7673 else
7732 frame = Qnil; 7674 frame = Qnil;
7733 7675
7734 any_help_event_p = 1; 7676 any_help_event_p = 1;
7735 n = gen_help_event (bufp, help_echo, frame, 7677 n = gen_help_event (bufp, help_echo, frame, help_echo_window,
7736 help_echo_object, help_echo_pos); 7678 help_echo_object, help_echo_pos);
7737 bufp += n, count += n, numchars -= n; 7679 bufp += n, count += n, numchars -= n;
7738 } 7680 }
7739 break; 7681 break;
7740 7682
8057 if (any_help_event_p) 7999 if (any_help_event_p)
8058 { 8000 {
8059 int n; 8001 int n;
8060 8002
8061 XSETFRAME (frame, f); 8003 XSETFRAME (frame, f);
8062 n = gen_help_event (bufp, Qnil, frame, Qnil, 0); 8004 n = gen_help_event (bufp, Qnil, frame, Qnil, Qnil, 0);
8063 bufp += n, count += n, numchars -=n; 8005 bufp += n, count += n, numchars -=n;
8064 } 8006 }
8065 } 8007 }
8066 8008
8067 dpyinfo->grabbed = 0; 8009 dpyinfo->grabbed = 0;
8362 8304
8363 cursor_glyph = get_phys_cursor_glyph (w); 8305 cursor_glyph = get_phys_cursor_glyph (w);
8364 if (cursor_glyph == NULL) 8306 if (cursor_glyph == NULL)
8365 return; 8307 return;
8366 8308
8367 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); 8309 /* If on an image, draw like a normal cursor. That's usually better
8368 8310 visible than drawing a bar, esp. if the image is large so that
8369 if (width < 0) 8311 the bar might not be in the window. */
8370 width = f->output_data.w32->cursor_width; 8312 if (cursor_glyph->type == IMAGE_GLYPH)
8371 8313 {
8372 hdc = get_frame_dc (f); 8314 struct glyph_row *row;
8373 w32_fill_area (f, hdc, f->output_data.w32->cursor_pixel, 8315 row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos);
8374 x, 8316 x_draw_phys_cursor_glyph (w, row, DRAW_CURSOR);
8375 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 8317 }
8376 min (cursor_glyph->pixel_width, width), 8318 else
8377 row->height); 8319 {
8378 release_frame_dc (f, hdc); 8320
8321 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
8322
8323 if (width < 0)
8324 width = f->output_data.w32->cursor_width;
8325
8326 hdc = get_frame_dc (f);
8327 w32_fill_area (f, hdc, f->output_data.w32->cursor_pixel,
8328 x,
8329 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
8330 min (cursor_glyph->pixel_width, width),
8331 row->height);
8332 release_frame_dc (f, hdc);
8333 }
8379 } 8334 }
8380 } 8335 }
8381 8336
8382 8337
8383 /* Clear the cursor of window W to background color, and mark the 8338 /* Clear the cursor of window W to background color, and mark the
8900 static INLINE void 8855 static INLINE void
8901 x_font_min_bounds (font, w, h) 8856 x_font_min_bounds (font, w, h)
8902 XFontStruct *font; 8857 XFontStruct *font;
8903 int *w, *h; 8858 int *w, *h;
8904 { 8859 {
8860 /*
8861 * NTEMACS_TODO: Windows does not appear to offer min bound, only
8862 * average and maximum width, and maximum height.
8863 */
8905 *h = FONT_HEIGHT (font); 8864 *h = FONT_HEIGHT (font);
8906 *w = FONT_WIDTH (font); 8865 *w = FONT_WIDTH (font);
8907 #if 0 /* NTEMACS_TODO: min/max bounds of Windows fonts */
8908 *w = font->min_bounds.width;
8909
8910 /* Try to handle the case where FONT->min_bounds has invalid
8911 contents. Since the only font known to have invalid min_bounds
8912 is fixed-width, use max_bounds if min_bounds seems to be invalid. */
8913 if (*w <= 0)
8914 *w = font->max_bounds.width;
8915 #endif
8916 } 8866 }
8917 8867
8918 8868
8919 /* Compute the smallest character width and smallest font height over 8869 /* Compute the smallest character width and smallest font height over
8920 all fonts available on frame F. Set the members smallest_char_width 8870 all fonts available on frame F. Set the members smallest_char_width
9000 if (flags & XNegative) 8950 if (flags & XNegative)
9001 f->output_data.w32->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width 8951 f->output_data.w32->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width
9002 - 2 * f->output_data.w32->border_width - pt.x 8952 - 2 * f->output_data.w32->border_width - pt.x
9003 - PIXEL_WIDTH (f) 8953 - PIXEL_WIDTH (f)
9004 + f->output_data.w32->left_pos); 8954 + f->output_data.w32->left_pos);
9005 /* NTEMACS_TODO: Subtract menubar height? */ 8955
9006 if (flags & YNegative) 8956 if (flags & YNegative)
9007 f->output_data.w32->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height 8957 f->output_data.w32->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height
9008 - 2 * f->output_data.w32->border_width - pt.y 8958 - 2 * f->output_data.w32->border_width - pt.y
9009 - PIXEL_HEIGHT (f) 8959 - PIXEL_HEIGHT (f)
9010 + f->output_data.w32->top_pos); 8960 + f->output_data.w32->top_pos);
9875 9825
9876 help_echo = Qnil; 9826 help_echo = Qnil;
9877 staticpro (&help_echo); 9827 staticpro (&help_echo);
9878 help_echo_object = Qnil; 9828 help_echo_object = Qnil;
9879 staticpro (&help_echo_object); 9829 staticpro (&help_echo_object);
9830 help_echo_window = Qnil;
9831 staticpro (&help_echo_window);
9880 previous_help_echo = Qnil; 9832 previous_help_echo = Qnil;
9881 staticpro (&previous_help_echo); 9833 staticpro (&previous_help_echo);
9834 help_echo_pos = -1;
9882 9835
9883 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, 9836 DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
9884 "*Non-nil means draw block cursor as wide as the glyph under it.\n\ 9837 "*Non-nil means draw block cursor as wide as the glyph under it.\n\
9885 For example, if a block cursor is over a tab, it will be drawn as\n\ 9838 For example, if a block cursor is over a tab, it will be drawn as\n\
9886 wide as that tab on the display."); 9839 wide as that tab on the display.");