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

Unified Diff: ui/gfx/gtk_preserve_window.cc

Issue 8921022: GTK: Even more cleanup to access allocation through the accessor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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 | « chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gtk_preserve_window.cc
diff --git a/ui/gfx/gtk_preserve_window.cc b/ui/gfx/gtk_preserve_window.cc
index 2706f1efea2786bf6389efe5c3b6c3ad9118eabf..32d6e351e552fa28bf672c06334b9a4404cb5ea1 100644
--- a/ui/gfx/gtk_preserve_window.cc
+++ b/ui/gfx/gtk_preserve_window.cc
@@ -78,15 +78,18 @@ static void gtk_preserve_window_realize(GtkWidget* widget) {
g_return_if_fail(GTK_IS_PRESERVE_WINDOW(widget));
if (widget->window) {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(widget, &allocation);
+
gdk_window_reparent(widget->window,
gtk_widget_get_parent_window(widget),
- widget->allocation.x,
- widget->allocation.y);
+ allocation.x,
+ allocation.y);
GtkPreserveWindowPrivate* priv = GTK_PRESERVE_WINDOW_GET_PRIVATE(widget);
if (!priv->delegate_resize) {
- gdk_window_resize(widget->window,
- widget->allocation.width,
- widget->allocation.height);
+ gdk_window_resize(gtk_widget_get_window(widget),
+ allocation.width,
+ allocation.height);
}
widget->style = gtk_style_attach(widget->style, widget->window);
gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL);
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698