/pidgin/main: 92bff33e5d0d: Fix XVideo rendering into GTK+ 3.0 G...

Jakub Adam jakub.adam at ktknet.cz
Sat Mar 19 14:06:03 EDT 2016


Changeset: 92bff33e5d0d827a946be96c44bd0c88f74ce634
Author:	 Jakub Adam <jakub.adam at ktknet.cz>
Date:	 2016-03-17 18:11 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/92bff33e5d0d

Description:

Fix XVideo rendering into GTK+ 3.0 GtkDialog

diffstat:

 pidgin/gtkutils.c |  12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (22 lines):

diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -236,6 +236,18 @@ pidgin_create_video_widget(void)
 	video = gtk_drawing_area_new();
 	gtk_widget_override_background_color(video, GTK_STATE_FLAG_NORMAL, &color);
 
+	/* In order to enable client shadow decorations, GtkDialog from GTK+ 3.0
+	 * uses ARGB visual which by default gets inherited by its child widgets.
+	 * XVideo adaptors on the other hand often support just depth 24 and
+	 * rendering video through xvimagesink onto a widget inside a GtkDialog
+	 * then results in no visible output.
+	 *
+	 * This ensures the default system visual of the drawing area doesn't get
+	 * overridden by the widget's parent.
+	 */
+	gtk_widget_set_visual(video,
+	                gdk_screen_get_system_visual(gtk_widget_get_screen(video)));
+
 	return video;
 }
 



More information about the Commits mailing list