summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gtk_preserve_window.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:12:53 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:12:53 +0000
commitdb89440b21bf4950a18f4479aaa961cfe13de035 (patch)
tree751748488e9d42892835457bed3b91495bd4e1fa /ui/gfx/gtk_preserve_window.cc
parentda7582b7e45e5f0aac0a1b072580be65b1502334 (diff)
downloadchromium_src-db89440b21bf4950a18f4479aaa961cfe13de035.zip
chromium_src-db89440b21bf4950a18f4479aaa961cfe13de035.tar.gz
chromium_src-db89440b21bf4950a18f4479aaa961cfe13de035.tar.bz2
GTK: Seal up GSEALs, focusing on GtkSelectionData.
BUG=79722 TEST=compiles First Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=116956 Review URL: http://codereview.chromium.org/9151007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117070 0039d316-1c4b-4281-b951-d872f2087c98
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);
}