diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 19:12:53 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 19:12:53 +0000 |
commit | db89440b21bf4950a18f4479aaa961cfe13de035 (patch) | |
tree | 751748488e9d42892835457bed3b91495bd4e1fa /ui/base/gtk | |
parent | da7582b7e45e5f0aac0a1b072580be65b1502334 (diff) | |
download | chromium_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/base/gtk')
-rw-r--r-- | ui/base/gtk/focus_store_gtk.cc | 4 | ||||
-rw-r--r-- | ui/base/gtk/gtk_compat.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ui/base/gtk/focus_store_gtk.cc b/ui/base/gtk/focus_store_gtk.cc index b98787c..3af039d 100644 --- a/ui/base/gtk/focus_store_gtk.cc +++ b/ui/base/gtk/focus_store_gtk.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,7 +25,7 @@ void FocusStoreGtk::Store(GtkWidget* widget) { GtkWidget* toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW); GtkWindow* window = GTK_IS_WINDOW(toplevel) ? GTK_WINDOW(toplevel) : NULL; if (window) - focus_widget = window->focus_widget; + focus_widget = gtk_window_get_focus(window); } SetWidget(focus_widget); diff --git a/ui/base/gtk/gtk_compat.h b/ui/base/gtk/gtk_compat.h index 2372387..4ca12df 100644 --- a/ui/base/gtk/gtk_compat.h +++ b/ui/base/gtk/gtk_compat.h @@ -49,6 +49,10 @@ inline void gtk_widget_set_realized(GtkWidget* widget, else GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); } + +inline void gtk_widget_style_attach(GtkWidget* widget) { + widget->style = gtk_style_attach(widget->style, widget->window); +} #endif // !GTK_CHECK_VERSION(2, 20, 0) || defined(GOOGLE_CHROME_BUILD) #if !GTK_CHECK_VERSION(2, 22, 0) |