diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 00:01:51 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-07 00:01:51 +0000 |
commit | 887eaa29c92cb8125c7cbc492dc564cf67d37899 (patch) | |
tree | e424348366abf7ee086354afaacf2e9f7d25bca8 | |
parent | aca840c242a14e1ee40665181b3515700c97e51b (diff) | |
download | chromium_src-887eaa29c92cb8125c7cbc492dc564cf67d37899.zip chromium_src-887eaa29c92cb8125c7cbc492dc564cf67d37899.tar.gz chromium_src-887eaa29c92cb8125c7cbc492dc564cf67d37899.tar.bz2 |
REVISION BACKED OUT
Revert 43779 - linux: explicitly unhighlight buttons before disabling
If your mouse is hovering the back button when the button is disabled
(i.e. you click back and it takes some time for the navigate to go
through), when the button is reenabled GTK restores the highlighted
state to the button.
I reproduced this in a very simplified naive app on the bug and had
the same result, so I think this workaround is ok.
BUG=13729
TEST=do the actions listed in the bug
Review URL: http://codereview.chromium.org/1521016
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/1599021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43783 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index ebde04c..f12e96d 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -303,16 +303,8 @@ void BrowserToolbarGtk::EnabledStateChangedForCommand(int id, bool enabled) { widget = home_->widget(); break; } - if (widget) { - if (!enabled && GTK_WIDGET_STATE(widget) == GTK_STATE_PRELIGHT) { - // If we're disabling a widget, GTK will helpfully restore it to its - // previous state when we re-enable it, even if that previous state - // is the prelight. This looks bad. See the bug for a simple repro. - // http://code.google.com/p/chromium/issues/detail?id=13729 - gtk_widget_set_state(widget, GTK_STATE_NORMAL); - } + if (widget) gtk_widget_set_sensitive(widget, enabled); - } } // MenuGtk::Delegate ----------------------------------------------------------- |