summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 01:49:19 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 01:49:19 +0000
commit56e8d19dc868891ec347c3eb85f11ce11f19ef58 (patch)
tree2d919634562eb2e671ba08ea36a7f85125e39d85 /chrome/browser/gtk
parent6453f5c5fb52736be02841ccfb8cd44788404205 (diff)
downloadchromium_src-56e8d19dc868891ec347c3eb85f11ce11f19ef58.zip
chromium_src-56e8d19dc868891ec347c3eb85f11ce11f19ef58.tar.gz
chromium_src-56e8d19dc868891ec347c3eb85f11ce11f19ef58.tar.bz2
GTK: correct coordinate calculation for floating bookmark bar background painting.
I believe changes to the windowed-ness of the widgetry in the bookmark bar caused this. BUG=27769 TEST=works in both classic theme mode and gtk theme mode Review URL: http://codereview.chromium.org/399103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index d3d0513..67c1d16 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -1178,12 +1178,12 @@ gboolean BookmarkBarGtk::OnEventBoxExpose(GtkWidget* widget,
if (!bar->GetTabContentsSize(&tab_contents_size))
return FALSE;
gfx::CanvasPaint canvas(event, true);
+
+ gfx::Rect area = GTK_WIDGET_NO_WINDOW(widget) ?
+ gfx::Rect(widget->allocation) :
+ gfx::Rect(0, 0, widget->allocation.width, widget->allocation.height);
NtpBackgroundUtil::PaintBackgroundDetachedMode(theme_provider, &canvas,
- // We can't just use gfx::Rect(widget->allocation) because the x,y for
- // the allocation is relative to the parent widget rather than the
- // GdkWindow.
- gfx::Rect(0, 0, widget->allocation.width, widget->allocation.height),
- tab_contents_size.height());
+ area, tab_contents_size.height());
}
return FALSE; // Propagate expose to children.