Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5309)

Unified Diff: chrome/browser/ui/gtk/panels/panel_gtk.cc

Issue 12223114: Fix bug 175858: [Linux] The panel does not accept keyboard input when it is minimized and expanded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/panels/panel_titlebar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/panels/panel_gtk.cc
diff --git a/chrome/browser/ui/gtk/panels/panel_gtk.cc b/chrome/browser/ui/gtk/panels/panel_gtk.cc
index d0e5d3b40a9c200a14caf3e1fd4bc4077393447d..8177532156bae6bcc5df28e3d78dae4d264a40e5 100644
--- a/chrome/browser/ui/gtk/panels/panel_gtk.cc
+++ b/chrome/browser/ui/gtk/panels/panel_gtk.cc
@@ -823,6 +823,14 @@ void PanelGtk::ClosePanel() {
void PanelGtk::ActivatePanel() {
gtk_window_present(window_);
+
+ // When the user clicks to expand the minimized panel, the panel has already
+ // become an active window before gtk_window_present is called. Thus the
+ // active window change event, fired by ActiveWindowWatcherXObserver, is not
+ // triggered. We need to call ActiveWindowChanged manually to update panel's
+ // active status. It is OK to call ActiveWindowChanged with the same active
+ // window twice since the 2nd call is just a no-op.
+ ActiveWindowChanged(gtk_widget_get_window(GTK_WIDGET(window_)));
}
void PanelGtk::DeactivatePanel() {
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/panels/panel_titlebar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698