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

Issue 1275363004: Mac: Fix another occurence of the two-windows-have-key-status bug (Closed)

Created:
5 years, 4 months ago by tapted
Modified:
5 years, 4 months ago
Reviewers:
Robert Sesek, dewittj
CC:
chromium-reviews, peter+watch_chromium.org, mlamouri+watch-notifications_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@20150807-MacCocoa-HangoutsAgain
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Fix another occurrence of the two-windows-have-key-status bug Message Center popups (notifications) create an NSPanel with NSNonactivatingPanelMask in its styleMask. This is documented as "The panel can receive keyboard input without activating the owning application." However, for these popups, the window reports `NO` from canBecomeKeyWindow. So it's actually impossible for the popup to get key status anyway. This seems to confuse Cocoa into this bad two-key-window state under an obscure set of repro steps involving Hangouts. So, remove NSNonactivatingPanelMask. However, usually Panels (also) obey a "not-visible-unless-application-is" rule. Simply removing NSNonactivatingPanelMask will cause notification popups to not be visible unless Chrome is active, which would be bad. To avoid this, just use a regular NSWindow instead of an NSPanel. BUG=459306 TEST=See repro case in http://crbug.com/459306#c38 . Shouldn't happen after this. Committed: https://crrev.com/ba96ee71b35d61b5dfcecc01a5c5f1568ed001c8 Cr-Commit-Position: refs/heads/master@{#343782}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M ui/message_center/cocoa/popup_controller.mm View 2 chunks +2 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (2 generated)
tapted
Hi Robert and Justin please take a look. Of course... this goes back to things ...
5 years, 4 months ago (2015-08-11 07:35:09 UTC) #2
dewittj
I defer to rsesek, as long as existing behavior/appearance remains then lgtm
5 years, 4 months ago (2015-08-11 18:08:49 UTC) #3
tapted
rsesek: hopeful ping?
5 years, 4 months ago (2015-08-17 01:31:48 UTC) #4
Robert Sesek
LGTM I changed this from NSWindow to NSPanel and added that style mask here: https://chromium.googlesource.com/chromium/src/+/338bcfd75953ebc2c1fd0084ecae6693835425c6 ...
5 years, 4 months ago (2015-08-17 15:35:41 UTC) #5
Robert Sesek
On 2015/08/17 01:31:48, tapted wrote: > rsesek: hopeful ping? Also sorry for the delay; I ...
5 years, 4 months ago (2015-08-17 18:15:44 UTC) #6
tapted
Thanks all! Here's hoping this is the last repro for http://crbug.com/459306 and that bug can ...
5 years, 4 months ago (2015-08-17 23:43:12 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1275363004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1275363004/1
5 years, 4 months ago (2015-08-17 23:44:51 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 4 months ago (2015-08-18 00:31:16 UTC) #10
commit-bot: I haz the power
5 years, 4 months ago (2015-08-18 00:32:19 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/ba96ee71b35d61b5dfcecc01a5c5f1568ed001c8
Cr-Commit-Position: refs/heads/master@{#343782}

Powered by Google App Engine
This is Rietveld 408576698