Index: chrome/browser/ui/gtk/rounded_window.cc |
diff --git a/chrome/browser/ui/gtk/rounded_window.cc b/chrome/browser/ui/gtk/rounded_window.cc |
index ca72c38742630f0633ba419e6134a8b30e1432e5..4fb2220d2f2b4a6f32ec857037da3245ab091233 100644 |
--- a/chrome/browser/ui/gtk/rounded_window.cc |
+++ b/chrome/browser/ui/gtk/rounded_window.cc |
@@ -205,10 +205,13 @@ gboolean OnRoundedWindowExpose(GtkWidget* widget, |
RoundedWindowData* data = static_cast<RoundedWindowData*>( |
g_object_get_data(G_OBJECT(widget), kRoundedData)); |
- if (data->expected_width != widget->allocation.width || |
- data->expected_height != widget->allocation.height) { |
- data->expected_width = widget->allocation.width; |
- data->expected_height = widget->allocation.height; |
+ GtkAllocation allocation; |
+ gtk_widget_get_allocation(widget, &allocation); |
+ |
+ if (data->expected_width != allocation.width || |
+ data->expected_height != allocation.height) { |
+ data->expected_width = allocation.width; |
+ data->expected_height = allocation.height; |
// We need to update the shape of the status bubble whenever our GDK |
// window changes shape. |
@@ -217,7 +220,8 @@ gboolean OnRoundedWindowExpose(GtkWidget* widget, |
GdkRegion* mask_region = gdk_region_polygon(&mask_points[0], |
mask_points.size(), |
GDK_EVEN_ODD_RULE); |
- gdk_window_shape_combine_region(widget->window, mask_region, 0, 0); |
+ gdk_window_shape_combine_region(gtk_widget_get_window(widget), |
+ mask_region, 0, 0); |
gdk_region_destroy(mask_region); |
} |