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

Side by Side Diff: chrome/browser/ui/gtk/gtk_input_event_box.cc

Issue 8773025: GTK: More removal of raw GtkWidget->allocation access. (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/gtk/gtk_input_event_box.h" 5 #include "chrome/browser/ui/gtk/gtk_input_event_box.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 G_BEGIN_DECLS 10 G_BEGIN_DECLS
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (priv->event_window) 116 if (priv->event_window)
117 gdk_window_hide(priv->event_window); 117 gdk_window_hide(priv->event_window);
118 118
119 GTK_WIDGET_CLASS(gtk_input_event_box_parent_class)->unmap(widget); 119 GTK_WIDGET_CLASS(gtk_input_event_box_parent_class)->unmap(widget);
120 } 120 }
121 121
122 static void gtk_input_event_box_size_allocate(GtkWidget* widget, 122 static void gtk_input_event_box_size_allocate(GtkWidget* widget,
123 GtkAllocation* allocation) { 123 GtkAllocation* allocation) {
124 g_return_if_fail(GTK_IS_INPUT_EVENT_BOX(widget)); 124 g_return_if_fail(GTK_IS_INPUT_EVENT_BOX(widget));
125 125
126 widget->allocation = *allocation; 126 gtk_widget_set_allocation(widget, allocation);
127 127
128 GtkInputEventBoxPrivate* priv = GTK_INPUT_EVENT_BOX_GET_PRIVATE(widget); 128 GtkInputEventBoxPrivate* priv = GTK_INPUT_EVENT_BOX_GET_PRIVATE(widget);
129 if (priv->event_window) { 129 if (priv->event_window) {
130 gdk_window_move_resize(priv->event_window, 130 gdk_window_move_resize(priv->event_window,
131 allocation->x, 131 allocation->x,
132 allocation->y, 132 allocation->y,
133 allocation->width, 133 allocation->width,
134 allocation->height); 134 allocation->height);
135 } 135 }
136 136
(...skipping 11 matching lines...) Expand all
148 } 148 }
149 149
150 GdkWindow* gtk_input_event_box_get_window(GtkInputEventBox* widget) { 150 GdkWindow* gtk_input_event_box_get_window(GtkInputEventBox* widget) {
151 g_return_val_if_fail(GTK_IS_INPUT_EVENT_BOX(widget), NULL); 151 g_return_val_if_fail(GTK_IS_INPUT_EVENT_BOX(widget), NULL);
152 152
153 GtkInputEventBoxPrivate* priv = GTK_INPUT_EVENT_BOX_GET_PRIVATE(widget); 153 GtkInputEventBoxPrivate* priv = GTK_INPUT_EVENT_BOX_GET_PRIVATE(widget);
154 return priv->event_window; 154 return priv->event_window;
155 } 155 }
156 156
157 G_END_DECLS 157 G_END_DECLS
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_custom_menu_item.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698