Commit da32ed96 authored by Chris Wilson's avatar Chris Wilson Committed by Chris Wilson
Browse files

Skip retrieving the VteBg if the source is VTE_BG_SOURCE_NONE as we

2007-09-30  Chris Wilson  <chris@chris-wilson.co.uk>

    * src/vtexft.c (_vte_xft_set_background_image):
	Skip retrieving the VteBg if the source is VTE_BG_SOURCE_NONE
	as we neither need it to listen for changes to the background
	nor require it to load the pixmap (which is a no-op).


svn path=/trunk/; revision=1957
parent 0b3b2c14
2007-09-30 Chris Wilson <chris@chris-wilson.co.uk>
* src/vtexft.c (_vte_xft_set_background_image):
Skip retrieving the VteBg if the source is VTE_BG_SOURCE_NONE
as we neither need it to listen for changes to the background
nor require it to load the pixmap (which is a no-op).
2007-09-30 Chris Wilson <chris@chris-wilson.co.uk>
* src/vtexft.c (_vte_xft_destroy):
......
......@@ -483,25 +483,30 @@ _vte_xft_set_background_image (struct _vte_draw *draw,
double saturation)
{
struct _vte_xft_data *data;
GdkPixmap *pixmap;
GdkScreen *screen;
GdkPixmap *pixmap = NULL;
data = (struct _vte_xft_data*) draw->impl_data;
screen = gtk_widget_get_screen (draw->widget);
draw->requires_clear = data->opacity != 0xffff;
data->xpixmap = -1;
data->pixmapw = data->pixmaph = 0;
pixmap = vte_bg_get_pixmap (vte_bg_get_for_screen (screen), type,
pixbuf, file, color, saturation,
_vte_draw_get_colormap (draw, TRUE));
if (data->pixmap != NULL) {
g_object_unref (data->pixmap);
}
draw->requires_clear = data->opacity != 0xffff;
data->pixmap = NULL;
if (type != VTE_BG_SOURCE_NONE) {
GdkScreen *screen;
screen = gtk_widget_get_screen (draw->widget);
pixmap = vte_bg_get_pixmap (vte_bg_get_for_screen (screen),
type, pixbuf, file,
color, saturation,
_vte_draw_get_colormap (draw, TRUE));
}
data->pixmap = pixmap;
if (pixmap != NULL) {
data->pixmap = pixmap;
data->xpixmap = gdk_x11_drawable_get_xid (pixmap);
gdk_drawable_get_size (pixmap, &data->pixmapw, &data->pixmaph);
draw->requires_clear |=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment