summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/status_bubble_mac.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 15:38:32 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 15:38:32 +0000
commit6ee7d1161d55d6cb3f21e9bf702ae7f726d50fb8 (patch)
treef753399d72ce430960cbb93b0dec26b8955ca048 /chrome/browser/cocoa/status_bubble_mac.h
parent0f87ade7a05ef8c5a7ef639f5551b89f76ab4746 (diff)
downloadchromium_src-6ee7d1161d55d6cb3f21e9bf702ae7f726d50fb8.zip
chromium_src-6ee7d1161d55d6cb3f21e9bf702ae7f726d50fb8.tar.gz
chromium_src-6ee7d1161d55d6cb3f21e9bf702ae7f726d50fb8.tar.bz2
Mac: improve apparent z-order problems when switching Spaces.
Remove the status bubble as child window when hidden, rather than just setting its opacity to 0. I'm not sure about the effects, if any, of doing this rather than destroying the window completely. This doesn't eliminate z-order problems with Spaces, but should improve it considerably. This may also ameliorate the problems with moving windows between Spaces using Expose. BUG=28107, 24956 TEST=Create a bunch of windows; get the status bubble to appear in the active (key) window and then get it to disappear; switch to another spaces and back; make sure the active window is on top; repeat. Review URL: http://codereview.chromium.org/434120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/status_bubble_mac.h')
-rw-r--r--chrome/browser/cocoa/status_bubble_mac.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/status_bubble_mac.h b/chrome/browser/cocoa/status_bubble_mac.h
index 8d33f04..e43b81f 100644
--- a/chrome/browser/cocoa/status_bubble_mac.h
+++ b/chrome/browser/cocoa/status_bubble_mac.h
@@ -63,9 +63,17 @@ class StatusBubbleMac : public StatusBubble {
// it does.)
void Create();
- // Attaches the status bubble window to its parent window.
+ // Attaches the status bubble window to its parent window. Safe to call even
+ // when already attached.
void Attach();
+ // Detaches the status bubble window from its parent window.
+ void Detach();
+
+ // Is the status bubble attached to the browser window? It should be attached
+ // when shown and during any fades, but should be detached when hidden.
+ bool is_attached() { return [window_ parentWindow] != nil; }
+
// Begins fading the status bubble window in or out depending on the value
// of |show|. This must be called from the appropriate fade state,
// kBubbleShowingFadeIn or kBubbleHidingFadeOut, or from the appropriate