summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_gtk.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 20:10:07 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 20:10:07 +0000
commit6844556bce70cce0be205e458cea4422e56c210f (patch)
treea80b2cf93edffee50652889ee1869875ae7bfeca /views/widget/widget_gtk.cc
parente795b0762091947662d8e4fc572a8c9d01488dd5 (diff)
downloadchromium_src-6844556bce70cce0be205e458cea4422e56c210f.zip
chromium_src-6844556bce70cce0be205e458cea4422e56c210f.tar.gz
chromium_src-6844556bce70cce0be205e458cea4422e56c210f.tar.bz2
Draw transparent background on window_content() only for TYPE_CHILD.
Transparent background is draws on GtkWindow for window types. This was necessary only for TYPE_CHILD. BUG=43611 TEST=type something in address bar and you'll see no flicker on dropdown. Review URL: http://codereview.chromium.org/2797001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.cc')
-rw-r--r--views/widget/widget_gtk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index 5f0f6f8..7bc8d03 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -896,10 +896,10 @@ void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
}
gboolean WidgetGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) {
- if (transparent_) {
+ if (transparent_ && type_ == TYPE_CHILD) {
// Clear the background before drawing any view and native components.
DrawTransparentBackground(widget, event);
- if (type_ == TYPE_CHILD && !CompositePainter::IsComposited(widget_)) {
+ if (!CompositePainter::IsComposited(widget_)) {
// Let the parent draw the content only after something is drawn on
// the widget.
CompositePainter::SetComposited(widget_);