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

Unified Diff: views/widget/widget_gtk.cc

Issue 2797001: Draw transparent background on window_content() only for TYPE_CHILD. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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/widget_gtk.cc
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index 5f0f6f87883a0cb797b4ffdbf689dc2acbf17122..7bc8d03968e3bcd8127b35aac3c409f45c26a43a 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_);
« 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