diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-17 11:29:25 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-17 11:29:25 +0000 |
commit | f079715313c3335f6d28d4d2f94382bf840f807f (patch) | |
tree | 663dc579183543b44461d74eed2fa473c9fb8a6e /chrome/browser/ui/panels/detached_panel_collection.cc | |
parent | 13c68b62a59a0483b59dff3eb75f2ac77c6166b2 (diff) | |
download | chromium_src-f079715313c3335f6d28d4d2f94382bf840f807f.zip chromium_src-f079715313c3335f6d28d4d2f94382bf840f807f.tar.gz chromium_src-f079715313c3335f6d28d4d2f94382bf840f807f.tar.bz2 |
Fix the problem that black background window might occasionally appear in front on Windows
When a new panel is added to a stack, the following things occur:
1) The panel is initially created as always on top on Windows.
2) The panel is changed to non-always-on-top.
3) The background stack window is made to the owner of the new panel window.
4) The background stack window is set to behind the new panel window in z-order.
Occasionally, step 2 might be run after step 4. When this occurs, after step 1, 3 and 4, the background stack window will automatically obtain the always-on-top state since the panel window behind which is set to is always-on-top. For most of time, running step 2 after 4 will remove the always-on-top state for both new panel window and background stack window. However, if chrome is not foreground application, Windows system might fail to deprive the always-on-top state for the background stack window.
The fix is to create the panel window with always-on-top state depending on its collection.
BUG=241224
TEST=Manual test by following the bug report
Review URL: https://chromiumcodereview.appspot.com/14956006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/panels/detached_panel_collection.cc')
-rw-r--r-- | chrome/browser/ui/panels/detached_panel_collection.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/ui/panels/detached_panel_collection.cc b/chrome/browser/ui/panels/detached_panel_collection.cc index 3437237..d525dac 100644 --- a/chrome/browser/ui/panels/detached_panel_collection.cc +++ b/chrome/browser/ui/panels/detached_panel_collection.cc @@ -190,6 +190,10 @@ bool DetachedPanelCollection::IsPanelMinimized(const Panel* panel) const { return false; } +bool DetachedPanelCollection::UsesAlwaysOnTopPanels() const { + return false; +} + void DetachedPanelCollection::SavePanelPlacement(Panel* panel) { DCHECK(!saved_panel_placement_.panel); saved_panel_placement_.panel = panel; @@ -234,7 +238,6 @@ void DetachedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) { panel->set_attention_mode( static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | Panel::USE_SYSTEM_ATTENTION)); - panel->SetAlwaysOnTop(false); panel->ShowShadow(true); panel->EnableResizeByMouse(true); panel->UpdateMinimizeRestoreButtonVisibility(); |