| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/widget/widget_gtk.h" | 5 #include "views/widget/widget_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
| 10 | 10 |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 return; | 955 return; |
| 956 size_ = new_size; | 956 size_ = new_size; |
| 957 root_view_->SetBounds(0, 0, allocation->width, allocation->height); | 957 root_view_->SetBounds(0, 0, allocation->width, allocation->height); |
| 958 root_view_->SchedulePaint(); | 958 root_view_->SchedulePaint(); |
| 959 } | 959 } |
| 960 | 960 |
| 961 gboolean WidgetGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) { | 961 gboolean WidgetGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) { |
| 962 if (transparent_ && type_ == TYPE_CHILD) { | 962 if (transparent_ && type_ == TYPE_CHILD) { |
| 963 // Clear the background before drawing any view and native components. | 963 // Clear the background before drawing any view and native components. |
| 964 DrawTransparentBackground(widget, event); | 964 DrawTransparentBackground(widget, event); |
| 965 if (!CompositePainter::IsComposited(widget_)) { | 965 if (!CompositePainter::IsComposited(widget_) && |
| 966 gdk_screen_is_composited(gdk_screen_get_default())) { |
| 966 // Let the parent draw the content only after something is drawn on | 967 // Let the parent draw the content only after something is drawn on |
| 967 // the widget. | 968 // the widget. |
| 968 CompositePainter::SetComposited(widget_); | 969 CompositePainter::SetComposited(widget_); |
| 969 } | 970 } |
| 970 } | 971 } |
| 971 root_view_->OnPaint(event); | 972 root_view_->OnPaint(event); |
| 972 return false; // False indicates other widgets should get the event as well. | 973 return false; // False indicates other widgets should get the event as well. |
| 973 } | 974 } |
| 974 | 975 |
| 975 void WidgetGtk::OnDragDataGet(GtkWidget* widget, | 976 void WidgetGtk::OnDragDataGet(GtkWidget* widget, |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 GtkWindow* window = GTK_WINDOW(element->data); | 1656 GtkWindow* window = GTK_WINDOW(element->data); |
| 1656 DCHECK(window); | 1657 DCHECK(window); |
| 1657 RootView *root_view = FindRootView(window); | 1658 RootView *root_view = FindRootView(window); |
| 1658 if (root_view) | 1659 if (root_view) |
| 1659 root_view->NotifyLocaleChanged(); | 1660 root_view->NotifyLocaleChanged(); |
| 1660 } | 1661 } |
| 1661 g_list_free(window_list); | 1662 g_list_free(window_list); |
| 1662 } | 1663 } |
| 1663 | 1664 |
| 1664 } // namespace views | 1665 } // namespace views |
| OLD | NEW |