}
}
- XftDrawChange (xft_draw, (Drawable) win);
+ if (XftDrawDrawable (xft_draw) != (Drawable) win)
+ XftDrawChange (xft_draw, (Drawable) win);
XftDrawSetClip (xft_draw, (Region) region);
y -= rfont->baseline_offset;
static void
mwin__destroy_window (MFrame *frame, MDrawWindow win)
{
+#ifdef HAVE_XFT2
+ XftDraw *xft_draw = FRAME_DEVICE (frame)->xft_draw;
+
+ if (XftDrawDrawable (xft_draw) == (Drawable) win)
+ XftDrawChange (xft_draw, FRAME_DEVICE (frame)->drawable);
+#endif /* HAVE_XFT2 */
XDestroyWindow (FRAME_DISPLAY (frame), (Window) win);
}