Simplify code: Use cairo_paint() to paint the whole pixmap
Also, gdk_drawable_get_size() is going away soon https://bugzilla.gnome.org/show_bug.cgi?id=630203
This commit is contained in:
parent
b79e6c0b3e
commit
afd3b96e2e
@ -2094,14 +2094,11 @@ clear_backing (GdkPixmap *pixmap,
|
|||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
int xoffset, int yoffset)
|
int xoffset, int yoffset)
|
||||||
{
|
{
|
||||||
int width, height;
|
|
||||||
cairo_t *cr = gdk_cairo_create (pixmap);
|
cairo_t *cr = gdk_cairo_create (pixmap);
|
||||||
|
|
||||||
setup_bg_cr (cr, window, xoffset, yoffset);
|
setup_bg_cr (cr, window, xoffset, yoffset);
|
||||||
|
|
||||||
gdk_drawable_get_size (GDK_DRAWABLE (pixmap), &width, &height);
|
cairo_paint (cr);
|
||||||
cairo_rectangle (cr, 0, 0, width, height);
|
|
||||||
cairo_fill (cr);
|
|
||||||
|
|
||||||
cairo_destroy (cr);
|
cairo_destroy (cr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user