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

Unified Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 9593001: Revert 124790 - Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « chrome/browser/ui/panels/panel_browser_window_gtk.h ('k') | chrome/browser/ui/panels/panel_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_window_gtk.cc
===================================================================
--- chrome/browser/ui/panels/panel_browser_window_gtk.cc (revision 124794)
+++ chrome/browser/ui/panels/panel_browser_window_gtk.cc (working copy)
@@ -97,6 +97,10 @@
ui::WorkAreaWatcherX::AddObserver(this);
registrar_.Add(
this,
+ chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE,
+ content::Source<Panel>(panel_.get()));
+ registrar_.Add(
+ this,
chrome::NOTIFICATION_PANEL_CHANGED_LAYOUT_MODE,
content::Source<Panel>(panel_.get()));
registrar_.Add(
@@ -271,6 +275,9 @@
switch (type) {
case chrome::NOTIFICATION_PANEL_CHANGED_LAYOUT_MODE:
titlebar()->UpdateCustomFrame(true);
+ // No break. Accept focus code should execute for both cases.
+ case chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE:
+ gtk_window_set_accept_focus(window(), !panel_->IsMinimized());
break;
case chrome::NOTIFICATION_WINDOW_CLOSED:
// Cleanup.
@@ -380,11 +387,6 @@
return IsActive();
}
-void PanelBrowserWindowGtk::PreventActivationByOS(bool prevent_activation) {
- gtk_window_set_accept_focus(window(), !prevent_activation);
- return;
-}
-
gfx::NativeWindow PanelBrowserWindowGtk::GetNativePanelHandle() {
return GetNativeHandle();
}
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.h ('k') | chrome/browser/ui/panels/panel_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698