Thu, 17 Mar 2016 18:11:31 +0100
Fix XVideo rendering into GTK+ 3.0 GtkDialog
| pidgin/gtkutils.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkutils.c Thu Mar 17 17:52:10 2016 +0100 +++ b/pidgin/gtkutils.c Thu Mar 17 18:11:31 2016 +0100 @@ -236,6 +236,18 @@ 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; }