[Xfce4-commits] [apps/xfce4-terminal] 01/01: Support background image transparency
noreply at xfce.org
noreply at xfce.org
Wed Nov 9 19:14:05 CET 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit f784f668abe9dc8a35fa53a2032eddb52ac526a9
Author: Igor <f2404 at yandex.ru>
Date: Wed Nov 9 20:11:25 2016 +0200
Support background image transparency
Implements https://bugzilla.xfce.org/show_bug.cgi?id=12944
---
terminal/terminal-screen.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 2ad569e..9b1c74f 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -490,14 +490,18 @@ terminal_screen_draw (GtkWidget *widget,
cairo_save (cr);
+ /* draw background image; cairo_set_operator() allows PNG transparency */
gdk_cairo_set_source_pixbuf (cr, image, 0, 0);
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
g_object_unref (G_OBJECT (image));
+ /* draw vte terminal */
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
ctx = cairo_create (surface);
gtk_widget_draw (screen->terminal, ctx);
cairo_set_source_surface (cr, surface, 0, 0);
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint (cr);
cairo_destroy (ctx);
cairo_surface_destroy (surface);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list