Commit 38ecf6ce authored by jianli@chromium.org's avatar jianli@chromium.org

Fix bug 175858: [Linux] The panel does not accept keyboard input when it is minimized and expanded

BUG=175858
TEST=Manual test by following the repro steps in the bug


Review URL: https://chromiumcodereview.appspot.com/12223114

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182121 0039d316-1c4b-4281-b951-d872f2087c98
parent 7cf1ab9c
......@@ -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() {
......
......@@ -266,6 +266,7 @@ void PanelTitlebarGtk::OnButtonClicked(GtkWidget* button) {
panel->OnRestoreButtonClicked(
(event->button.state & GDK_CONTROL_MASK) ?
panel::APPLY_TO_ALL : panel::NO_MODIFIER);
panel->Activate();
}
gdk_event_free(event);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment