summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gtk_preserve_window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/gtk_preserve_window.cc')
-rw-r--r--ui/gfx/gtk_preserve_window.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/gfx/gtk_preserve_window.cc b/ui/gfx/gtk_preserve_window.cc
index 5d40475..1af85b1 100644
--- a/ui/gfx/gtk_preserve_window.cc
+++ b/ui/gfx/gtk_preserve_window.cc
@@ -93,18 +93,16 @@ static void gtk_preserve_window_realize(GtkWidget* widget) {
allocation.width,
allocation.height);
}
- widget->style = gtk_style_attach(widget->style, widget->window);
- gtk_style_set_background(gtk_widget_get_style(widget),
- gdk_window, GTK_STATE_NORMAL);
-
gint event_mask = gtk_widget_get_events(widget);
event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
gdk_window_set_events(gdk_window, (GdkEventMask) event_mask);
gdk_window_set_user_data(gdk_window, widget);
- // Deprecated as of GTK 2.22. Used for compatibility.
- // It should be: gtk_widget_set_realized(widget, TRUE)
- GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+ gtk_widget_set_realized(widget, TRUE);
+
+ gtk_widget_style_attach(widget);
+ gtk_style_set_background(gtk_widget_get_style(widget),
+ gdk_window, GTK_STATE_NORMAL);
} else {
GTK_WIDGET_CLASS(gtk_preserve_window_parent_class)->realize(widget);
}