Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: views/widget/root_view_gtk.cc

Issue 147170: Fixes bug in RootViewGtk where we we might not paint correctly if... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/root_view_gtk.cc
===================================================================
--- views/widget/root_view_gtk.cc (revision 19280)
+++ views/widget/root_view_gtk.cc (working copy)
@@ -13,8 +13,19 @@
namespace views {
void RootView::OnPaint(GdkEventExpose* event) {
+ gfx::Rect original_dirty_region = GetScheduledPaintRectConstrainedToSize();
+ if (!original_dirty_region.IsEmpty()) {
+ // Between the the time the paint was scheduled and the time we end
+ // up painting more SchedulePaints may have been invoked. Expand the
+ // region Gdk wants us to paint to include the region we want to paint
+ // to make sure everything is painted. Otherwise we may not paint
+ // everything we need to.
+ gfx::Rect complete_area =
+ original_dirty_region.Union(gfx::Rect(event->area));
+ event->area = complete_area.ToGdkRectangle();
+ }
+
gfx::CanvasPaint canvas(event);
-
if (!canvas.is_empty()) {
canvas.set_composite_alpha(
static_cast<WidgetGtk*>(GetWidget())->is_transparent());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698