#endif
-static void x_prepare_for_xlibdraw (struct frame *);
+static void x_free_cr_resources (struct frame *);
static void x_set_clip_rectangles (struct frame *, GC, XRectangle *, int);
static void x_reset_clip_rectangles (struct frame *, GC);
static void x_fill_rectangle (struct frame *, GC, int, int, int, int);
width = FRAME_PIXEL_WIDTH (f);
height = FRAME_PIXEL_HEIGHT (f);
- x_prepare_for_xlibdraw (f);
+ x_free_cr_resources (f);
FRAME_CR_CONTEXT (f) = cr;
x_clear_area (f, 0, 0, width, height);
expose_frame (f, 0, 0, width, height);
QUIT;
block_input ();
- x_prepare_for_xlibdraw (f);
+ x_free_cr_resources (f);
FRAME_CR_CONTEXT (f) = cr;
x_clear_area (f, 0, 0, width, height);
expose_frame (f, 0, 0, width, height);
#endif /* USE_CAIRO */
static void
-x_prepare_for_xlibdraw (struct frame *f)
+x_free_cr_resources (struct frame *f)
{
#ifdef USE_CAIRO
if (f == NULL)
Lisp_Object rest, frame;
FOR_EACH_FRAME (rest, frame)
if (FRAME_X_P (XFRAME (frame)))
- x_prepare_for_xlibdraw (XFRAME (frame));
+ x_free_cr_resources (XFRAME (frame));
}
else
{
x_update_begin (struct frame *f)
{
#ifdef USE_CAIRO
+ if (! NILP (tip_frame) && XFRAME (tip_frame) == f
+ && ! FRAME_VISIBLE_P (f))
+ return;
+
if (! FRAME_CR_SURFACE (f))
{
int width, height;
}
/* Draw the foreground. */
+#ifdef USE_CAIRO
if (s->img->cr_data)
{
cairo_t *cr = x_begin_cr_clip (s->f, s->gc);
cairo_fill (cr);
x_end_cr_clip (s->f);
}
- else if (pixmap != None)
+ else
+#endif
+ if (pixmap != None)
{
x_draw_image_foreground_1 (s, pixmap);
x_set_glyph_string_clipping (s);
static void
x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by)
{
- x_prepare_for_xlibdraw (f);
+ x_free_cr_resources (f);
XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f),
f->output_data.x->normal_gc,
x, y, width, height,
free_frame_xic (f);
#endif
- x_prepare_for_xlibdraw (f);
+ x_free_cr_resources (f);
#ifdef USE_X_TOOLKIT
if (f->output_data.x->widget)
{