Commit 1934de4b authored by Javier Jardón's avatar Javier Jardón

Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)

Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
parent 24bafd86
...@@ -229,7 +229,7 @@ gtk_rotated_bin_realize (GtkWidget *widget) ...@@ -229,7 +229,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
gint border_width; gint border_width;
GtkRequisition child_requisition; GtkRequisition child_requisition;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -167,7 +167,7 @@ gtk_mirror_bin_realize (GtkWidget *widget) ...@@ -167,7 +167,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
gint border_width; gint border_width;
GtkRequisition child_requisition; GtkRequisition child_requisition;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -11925,7 +11925,7 @@ gtk_dial_realize (GtkWidget *widget) ...@@ -11925,7 +11925,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL); g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget)); g_return_if_fail (GTK_IS_DIAL (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget); dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
...@@ -15113,7 +15113,7 @@ gtk_dial_realize (GtkWidget *widget) ...@@ -15113,7 +15113,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL); g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget)); g_return_if_fail (GTK_IS_DIAL (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget); dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -214,7 +214,7 @@ gtk_dial_realize (GtkWidget *widget) ...@@ -214,7 +214,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL); g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget)); g_return_if_fail (GTK_IS_DIAL (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget); dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -1175,7 +1175,7 @@ gtk_button_realize (GtkWidget *widget) ...@@ -1175,7 +1175,7 @@ gtk_button_realize (GtkWidget *widget)
gint border_width; gint border_width;
button = GTK_BUTTON (widget); button = GTK_BUTTON (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -1572,7 +1572,7 @@ gtk_calendar_realize (GtkWidget *widget) ...@@ -1572,7 +1572,7 @@ gtk_calendar_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y; attributes.y = widget->allocation.y;
......
...@@ -4458,7 +4458,7 @@ gtk_clist_realize (GtkWidget *widget) ...@@ -4458,7 +4458,7 @@ gtk_clist_realize (GtkWidget *widget)
clist = GTK_CLIST (widget); clist = GTK_CLIST (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -85,7 +85,7 @@ gtk_drawing_area_realize (GtkWidget *widget) ...@@ -85,7 +85,7 @@ gtk_drawing_area_realize (GtkWidget *widget)
} }
else else
{ {
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -2753,7 +2753,7 @@ gtk_entry_realize (GtkWidget *widget) ...@@ -2753,7 +2753,7 @@ gtk_entry_realize (GtkWidget *widget)
gint attributes_mask; gint attributes_mask;
int i; int i;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
entry = GTK_ENTRY (widget); entry = GTK_ENTRY (widget);
priv = GTK_ENTRY_GET_PRIVATE (entry); priv = GTK_ENTRY_GET_PRIVATE (entry);
......
...@@ -372,7 +372,7 @@ gtk_event_box_realize (GtkWidget *widget) ...@@ -372,7 +372,7 @@ gtk_event_box_realize (GtkWidget *widget)
GtkEventBoxPrivate *priv; GtkEventBoxPrivate *priv;
gboolean visible_window; gboolean visible_window;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -403,7 +403,7 @@ gtk_expander_realize (GtkWidget *widget) ...@@ -403,7 +403,7 @@ gtk_expander_realize (GtkWidget *widget)
gint label_height; gint label_height;
priv = GTK_EXPANDER (widget)->priv; priv = GTK_EXPANDER (widget)->priv;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -277,7 +277,7 @@ gtk_fixed_realize (GtkWidget *widget) ...@@ -277,7 +277,7 @@ gtk_fixed_realize (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_fixed_parent_class)->realize (widget); GTK_WIDGET_CLASS (gtk_fixed_parent_class)->realize (widget);
else else
{ {
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -394,7 +394,7 @@ gtk_handle_box_realize (GtkWidget *widget) ...@@ -394,7 +394,7 @@ gtk_handle_box_realize (GtkWidget *widget)
hb = GTK_HANDLE_BOX (widget); hb = GTK_HANDLE_BOX (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y; attributes.y = widget->allocation.y;
......
...@@ -279,7 +279,7 @@ gtk_hsv_realize (GtkWidget *widget) ...@@ -279,7 +279,7 @@ gtk_hsv_realize (GtkWidget *widget)
hsv = GTK_HSV (widget); hsv = GTK_HSV (widget);
priv = hsv->priv; priv = hsv->priv;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
/* Create window */ /* Create window */
......
...@@ -1318,7 +1318,7 @@ gtk_icon_view_realize (GtkWidget *widget) ...@@ -1318,7 +1318,7 @@ gtk_icon_view_realize (GtkWidget *widget)
icon_view = GTK_ICON_VIEW (widget); icon_view = GTK_ICON_VIEW (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
/* Make the main, clipping window */ /* Make the main, clipping window */
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
......
...@@ -218,7 +218,7 @@ gtk_invisible_realize (GtkWidget *widget) ...@@ -218,7 +218,7 @@ gtk_invisible_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
parent = gtk_widget_get_parent_window (widget); parent = gtk_widget_get_parent_window (widget);
if (parent == NULL) if (parent == NULL)
......
...@@ -125,7 +125,7 @@ gtk_item_realize (GtkWidget *widget) ...@@ -125,7 +125,7 @@ gtk_item_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y; attributes.y = widget->allocation.y;
......
...@@ -847,7 +847,7 @@ gtk_layout_realize (GtkWidget *widget) ...@@ -847,7 +847,7 @@ gtk_layout_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (layout, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -451,7 +451,7 @@ gtk_list_realize (GtkWidget *widget) ...@@ -451,7 +451,7 @@ gtk_list_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -431,7 +431,7 @@ gtk_list_item_realize (GtkWidget *widget) ...@@ -431,7 +431,7 @@ gtk_list_item_realize (GtkWidget *widget)
g_return_if_fail (GTK_IS_LIST_ITEM (widget)); g_return_if_fail (GTK_IS_LIST_ITEM (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y; attributes.y = widget->allocation.y;
......
...@@ -2263,7 +2263,7 @@ gtk_menu_realize (GtkWidget *widget) ...@@ -2263,7 +2263,7 @@ gtk_menu_realize (GtkWidget *widget)
menu = GTK_MENU (widget); menu = GTK_MENU (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -1129,7 +1129,7 @@ gtk_menu_item_realize (GtkWidget *widget) ...@@ -1129,7 +1129,7 @@ gtk_menu_item_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window); g_object_ref (widget->window);
......
...@@ -513,7 +513,7 @@ gtk_menu_shell_realize (GtkWidget *widget) ...@@ -513,7 +513,7 @@ gtk_menu_shell_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y; attributes.y = widget->allocation.y;
......
...@@ -308,7 +308,7 @@ gtk_misc_realize (GtkWidget *widget) ...@@ -308,7 +308,7 @@ gtk_misc_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
if (!gtk_widget_get_has_window (widget)) if (!gtk_widget_get_has_window (widget))
{ {
......
...@@ -1798,7 +1798,8 @@ gtk_notebook_realize (GtkWidget *widget) ...@@ -1798,7 +1798,8 @@ gtk_notebook_realize (GtkWidget *widget)
GdkRectangle event_window_pos; GdkRectangle event_window_pos;
notebook = GTK_NOTEBOOK (widget); notebook = GTK_NOTEBOOK (widget);
GTK_WIDGET_SET_FLAGS (notebook, GTK_REALIZED);
gtk_widget_set_realized (widget, TRUE);
gtk_notebook_get_event_window_position (notebook, &event_window_pos); gtk_notebook_get_event_window_position (notebook, &event_window_pos);
......
...@@ -125,7 +125,7 @@ gtk_offscreen_window_realize (GtkWidget *widget) ...@@ -125,7 +125,7 @@ gtk_offscreen_window_realize (GtkWidget *widget)
bin = GTK_BIN (widget); bin = GTK_BIN (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget)); border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
......
...@@ -978,7 +978,7 @@ gtk_paned_realize (GtkWidget *widget) ...@@ -978,7 +978,7 @@ gtk_paned_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
paned = GTK_PANED (widget); paned = GTK_PANED (widget);
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
......
...@@ -408,7 +408,7 @@ gtk_path_bar_realize (GtkWidget *widget) ...@@ -408,7 +408,7 @@ gtk_path_bar_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
path_bar = GTK_PATH_BAR (widget); path_bar = GTK_PATH_BAR (widget);
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
......
...@@ -607,7 +607,7 @@ gtk_plug_realize (GtkWidget *widget) ...@@ -607,7 +607,7 @@ gtk_plug_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */ attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */
attributes.title = window->title; attributes.title = window->title;
......
...@@ -420,7 +420,7 @@ gtk_preview_realize (GtkWidget *widget) ...@@ -420,7 +420,7 @@ gtk_preview_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
......
...@@ -212,7 +212,7 @@ gtk_progress_realize (GtkWidget *widget) ...@@ -212,7 +212,7 @@ gtk_progress_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -1495,7 +1495,7 @@ gtk_range_realize (GtkWidget *widget) ...@@ -1495,7 +1495,7 @@ gtk_range_realize (GtkWidget *widget)
gtk_range_calc_layout (range, range->adjustment->value); gtk_range_calc_layout (range, range->adjustment->value);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window); g_object_ref (widget->window);
......
...@@ -441,7 +441,8 @@ gtk_ruler_realize (GtkWidget *widget) ...@@ -441,7 +441,8 @@ gtk_ruler_realize (GtkWidget *widget)
gint attributes_mask; gint attributes_mask;
ruler = GTK_RULER (widget); ruler = GTK_RULER (widget);
GTK_WIDGET_SET_FLAGS (ruler, GTK_REALIZED);
gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -326,7 +326,7 @@ gtk_socket_realize (GtkWidget *widget) ...@@ -326,7 +326,7 @@ gtk_socket_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
...@@ -390,7 +390,7 @@ gtk_socket_unrealize (GtkWidget *widget) ...@@ -390,7 +390,7 @@ gtk_socket_unrealize (GtkWidget *widget)
{ {
GtkSocket *socket = GTK_SOCKET (widget); GtkSocket *socket = GTK_SOCKET (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, FALSE);
if (socket->plug_widget) if (socket->plug_widget)
{ {
......
...@@ -1239,7 +1239,7 @@ gtk_text_realize (GtkWidget *widget) ...@@ -1239,7 +1239,7 @@ gtk_text_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (text, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -3827,7 +3827,8 @@ gtk_text_view_realize (GtkWidget *widget) ...@@ -3827,7 +3827,8 @@ gtk_text_view_realize (GtkWidget *widget)
GSList *tmp_list; GSList *tmp_list;
text_view = GTK_TEXT_VIEW (widget); text_view = GTK_TEXT_VIEW (widget);
GTK_WIDGET_SET_FLAGS (text_view, GTK_REALIZED);
gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -813,7 +813,7 @@ gtk_toolbar_realize (GtkWidget *widget) ...@@ -813,7 +813,7 @@ gtk_toolbar_realize (GtkWidget *widget)
gint attributes_mask; gint attributes_mask;
gint border_width; gint border_width;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width; border_width = GTK_CONTAINER (widget)->border_width;
......
...@@ -462,7 +462,7 @@ gtk_tool_item_realize (GtkWidget *widget) ...@@ -462,7 +462,7 @@ gtk_tool_item_realize (GtkWidget *widget)
GtkToolItem *toolitem; GtkToolItem *toolitem;
toolitem = GTK_TOOL_ITEM (widget); toolitem = GTK_TOOL_ITEM (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window); g_object_ref (widget->window);
......
...@@ -1181,7 +1181,7 @@ gtk_tool_item_group_realize (GtkWidget *widget) ...@@ -1181,7 +1181,7 @@ gtk_tool_item_group_realize (GtkWidget *widget)
gdk_window_set_user_data (widget->window, widget); gdk_window_set_user_data (widget->window, widget);
widget->style = gtk_style_attach (widget->style, widget->window); widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
gtk_container_forall (GTK_CONTAINER (widget), gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_set_parent_window, (GtkCallback) gtk_widget_set_parent_window,
......
...@@ -672,7 +672,7 @@ gtk_tool_palette_realize (GtkWidget *widget) ...@@ -672,7 +672,7 @@ gtk_tool_palette_realize (GtkWidget *widget)
gdk_window_set_user_data (widget->window, widget); gdk_window_set_user_data (widget->window, widget);
widget->style = gtk_style_attach (widget->style, widget->window); widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
gtk_container_forall (GTK_CONTAINER (widget), gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_set_parent_window, (GtkCallback) gtk_widget_set_parent_window,
......
...@@ -560,7 +560,7 @@ gtk_tree_realize (GtkWidget *widget) ...@@ -560,7 +560,7 @@ gtk_tree_realize (GtkWidget *widget)
g_return_if_fail (GTK_IS_TREE (widget)); g_return_if_fail (GTK_IS_TREE (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x; attributes.x = widget->allocation.x;
......
...@@ -1767,7 +1767,7 @@ gtk_tree_view_realize (GtkWidget *widget) ...@@ -1767,7 +1767,7 @@ gtk_tree_view_realize (GtkWidget *widget)
GdkWindowAttr attributes; GdkWindowAttr attributes;
gint attributes_mask; gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
/* Make the main, clipping window */ /* Make the main, clipping window */
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
......
...@@ -588,7 +588,7 @@ gtk_viewport_realize (GtkWidget *widget) ...@@ -588,7 +588,7 @@ gtk_viewport_realize (GtkWidget *widget)
gint attributes_mask; gint attributes_mask;
gint event_mask; gint event_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x + border_width; attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width; attributes.y = widget->allocation.y + border_width;
......
...@@ -5989,9 +5989,9 @@ gtk_widget_set_realized (GtkWidget *widget, ...@@ -5989,9 +5989,9 @@ gtk_widget_set_realized (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
if (realized) if (realized)
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); GTK_OBJECT_FLAGS (widget) |= GTK_REALIZED;
else else
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED); GTK_OBJECT_FLAGS (widget) &= ~(GTK_REALIZED);
} }
/** /**
...@@ -8793,7 +8793,7 @@ gtk_widget_real_realize (GtkWidget *widget) ...@@ -8793,7 +8793,7 @@ gtk_widget_real_realize (GtkWidget *widget)
{ {
g_assert (!gtk_widget_get_has_window (widget)); g_assert (!gtk_widget_get_has_window (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
if (widget->parent) if (widget->parent)
{ {
widget->window = gtk_widget_get_parent_window (widget); widget->window = gtk_widget_get_parent_window (widget);
...@@ -8847,7 +8847,7 @@ gtk_widget_real_unrealize (GtkWidget *widget) ...@@ -8847,7 +8847,7 @@ gtk_widget_real_unrealize (GtkWidget *widget)
gtk_selection_remove_all (widget); gtk_selection_remove_all (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, FALSE);
} }
static void static void
......
...@@ -200,7 +200,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget) ...@@ -200,7 +200,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
g_return_if_fail (!gtk_widget_get_realized (widget)); g_return_if_fail (!gtk_widget_get_realized (widget));
} }
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.title = window->title; attributes.title = window->title;
......
...@@ -4742,7 +4742,7 @@ gtk_window_realize (GtkWidget *widget) ...@@ -4742,7 +4742,7 @@ gtk_window_realize (GtkWidget *widget)
g_return_if_fail (!gtk_widget_get_realized (widget)); g_return_if_fail (!gtk_widget_get_realized (widget));
} }
GTK_WIDGET_SET_FLAGS (widget