| 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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 // reset the shape in this method regardless of whether the size changed. | 894 // reset the shape in this method regardless of whether the size changed. |
| 895 gfx::Size new_size(allocation->width, allocation->height); | 895 gfx::Size new_size(allocation->width, allocation->height); |
| 896 if (new_size == size_) | 896 if (new_size == size_) |
| 897 return; | 897 return; |
| 898 size_ = new_size; | 898 size_ = new_size; |
| 899 root_view_->SetBounds(0, 0, allocation->width, allocation->height); | 899 root_view_->SetBounds(0, 0, allocation->width, allocation->height); |
| 900 root_view_->SchedulePaint(); | 900 root_view_->SchedulePaint(); |
| 901 } | 901 } |
| 902 | 902 |
| 903 gboolean WidgetGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) { | 903 gboolean WidgetGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) { |
| 904 if (transparent_) { | 904 if (transparent_ && type_ == TYPE_CHILD) { |
| 905 // Clear the background before drawing any view and native components. | 905 // Clear the background before drawing any view and native components. |
| 906 DrawTransparentBackground(widget, event); | 906 DrawTransparentBackground(widget, event); |
| 907 } | 907 } |
| 908 root_view_->OnPaint(event); | 908 root_view_->OnPaint(event); |
| 909 return false; // False indicates other widgets should get the event as well. | 909 return false; // False indicates other widgets should get the event as well. |
| 910 } | 910 } |
| 911 | 911 |
| 912 void WidgetGtk::OnDragDataGet(GtkWidget* widget, | 912 void WidgetGtk::OnDragDataGet(GtkWidget* widget, |
| 913 GdkDragContext* context, | 913 GdkDragContext* context, |
| 914 GtkSelectionData* data, | 914 GtkSelectionData* data, |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 GtkWindow* window = GTK_WINDOW(element->data); | 1529 GtkWindow* window = GTK_WINDOW(element->data); |
| 1530 DCHECK(window); | 1530 DCHECK(window); |
| 1531 RootView *root_view = FindRootView(window); | 1531 RootView *root_view = FindRootView(window); |
| 1532 if (root_view) | 1532 if (root_view) |
| 1533 root_view->NotifyLocaleChanged(); | 1533 root_view->NotifyLocaleChanged(); |
| 1534 } | 1534 } |
| 1535 g_list_free(window_list); | 1535 g_list_free(window_list); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 } // namespace views | 1538 } // namespace views |
| OLD | NEW |