]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix hud rendering issue
authorjstebbins <jstebbins.hb@gmail.com>
Wed, 3 Aug 2011 22:17:14 +0000 (22:17 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Wed, 3 Aug 2011 22:17:14 +0000 (22:17 +0000)
On some display drivers, the rounded corners of the hud would retain
the previous preview image when the preview was changed.  This adds
a region mask to compensate for buggy drivers.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4154 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/ghbcompositor.c

index b4054055f3462cedf8f9e2b59a92d64f43e5d1a8..93f533c3c68a4d9557002001696385457ac3c0d9 100644 (file)
@@ -634,7 +634,14 @@ ghb_compositor_blend (GtkWidget *widget, GdkEventExpose *event)
             /* draw no more than our expose event intersects our child */
             region = gdk_region_rectangle (&child->allocation);
             gdk_region_intersect (region, event->region);
+
+            GdkRegion *dregion = gdk_drawable_get_visible_region(
+                                            gtk_widget_get_window(child));
+            gdk_region_offset(dregion, child->allocation.x, child->allocation.y);
+            gdk_region_intersect (region, dregion);
+
             gdk_cairo_region (cr, region);
+            gdk_region_destroy(region);
             cairo_clip (cr);
             /* composite, with an opacity */
             cairo_set_operator (cr, CAIRO_OPERATOR_OVER);