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

Issue 434120: Mac: improve apparent z-order problems when switching Spaces. (Closed)

Created:
11 years ago by viettrungluu
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33287

Patch Set 1 #

Total comments: 8

Patch Set 2 : Wow. git-cl requires a nonempty message. #

Total comments: 4

Patch Set 3 : Updated per pink's review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -12 lines) Patch
M chrome/browser/cocoa/chrome_event_processing_window.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.h View 1 2 1 chunk +9 lines, -1 line 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.mm View 1 2 5 chunks +23 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
viettrungluu
See my comments on the related bugs. Admittedly, my confidence that this patch will always ...
11 years ago (2009-11-27 18:47:09 UTC) #1
Nico
Merging this in makes my simple spaces repro stop working. I think this should go ...
11 years ago (2009-11-30 02:04:28 UTC) #2
viettrungluu
Thanks, Nico. I'm a little ambivalent about pushing this into 249, though it would improve ...
11 years ago (2009-11-30 08:43:18 UTC) #3
pink (ping after 24hrs)
lgtm. i think this is safe enough for 249. http://codereview.chromium.org/434120/diff/2002/3005 File chrome/browser/cocoa/status_bubble_mac.h (right): http://codereview.chromium.org/434120/diff/2002/3005#newcode75 chrome/browser/cocoa/status_bubble_mac.h:75: ...
11 years ago (2009-11-30 14:20:52 UTC) #4
Nico
LG
11 years ago (2009-11-30 15:22:11 UTC) #5
viettrungluu
11 years ago (2009-11-30 15:48:00 UTC) #6
Thanks.

I'm biased against this CL since it took me a surprising amount of trouble to
get it working right (or at least not failing DCHECK()'s). I guess the final
result isn't so bad. If nothing blows up, I'll merge it into 249 later today.

http://codereview.chromium.org/434120/diff/2002/3005
File chrome/browser/cocoa/status_bubble_mac.h (right):

http://codereview.chromium.org/434120/diff/2002/3005#newcode75
chrome/browser/cocoa/status_bubble_mac.h:75: bool is_attached() { return
([window_ parentWindow] != nil); }
On 2009/11/30 14:20:52, pink wrote:
> remove the parens. return is not a function.

Of course not -- that's why there's a space. ;-) The parens indicate that the
comparison's truth value is being used (see what I said to Nico). But since I'm
outnumbered, I've changed it.

http://codereview.chromium.org/434120/diff/2002/3006
File chrome/browser/cocoa/status_bubble_mac.mm (right):

http://codereview.chromium.org/434120/diff/2002/3006#newcode351
chrome/browser/cocoa/status_bubble_mac.mm:351: if (is_attached())
On 2009/11/30 14:20:52, pink wrote:
> should you DCHECK(is_attached()) here or can this also be called multiple
times?

No. It's definitely called multiple times when the window is destroyed.
Moreover, it should probably be safe to call the public interface Hide()
multiple times (the interface doesn't specify this, but there's no interface to
check the state).

> Is a comment like the one above warranted?

Comment added.

Powered by Google App Engine
This is Rietveld 408576698