}
else
#endif
- if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+ if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+ /* When xdisp.c ignores FONT_HEIGHT, we cannot trust
+ font dimensions, since the actual glyphs might be
+ much smaller. So in that case we always clear the
+ rectangle with background color. */
+ || FONT_TOO_HIGH (s->font)
|| s->font_not_found_p
|| s->extends_to_end_of_line_p
|| force_p)
x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
- int unit;
+ int unit, font_ascent, font_descent;
if (fontset < 0)
fontset = fontset_from_font (font_object);
FRAME_FONT (f) = font;
FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
FRAME_COLUMN_WIDTH (f) = unit = font->average_width;
- FRAME_LINE_HEIGHT (f) = font->height;
+ get_font_ascent_descent (font, &font_ascent, &font_descent);
+ FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
/* Compute number of scrollbar columns. */
unit = FRAME_COLUMN_WIDTH (f);
struct w32_output *w32 = FRAME_X_OUTPUT (f);
w32->hourglass_p = 0;
- SetCursor (w32->current_cursor);
+ if (f->pointer_invisible)
+ SetCursor (NULL);
+ else
+ SetCursor (w32->current_cursor);
}
/* FIXME: old code did that, but I don't know why. Anyway,
SetCursor (w32_load_cursor (IDC_ARROW));
}
+static void
+w32_toggle_invisible_pointer (struct frame *f, bool invisible)
+{
+ block_input ();
+
+ if (f->pointer_invisible != invisible)
+ {
+ f->pointer_invisible = invisible;
+ w32_define_cursor (FRAME_W32_WINDOW (f),
+ f->output_data.w32->current_cursor);
+ }
+
+ unblock_input ();
+}
+
/***********************************************************************
Initialization
***********************************************************************/
terminal->ins_del_lines_hook = x_ins_del_lines;
terminal->delete_glyphs_hook = x_delete_glyphs;
terminal->ring_bell_hook = w32_ring_bell;
+ terminal->toggle_invisible_pointer_hook = w32_toggle_invisible_pointer;
terminal->update_begin_hook = x_update_begin;
terminal->update_end_hook = x_update_end;
terminal->read_socket_hook = w32_read_socket;