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

Issue 1278073002: Mac: Use activateIgnoringOtherApps instead of SetFrontProcessWithOptions to focus app windows (Closed)

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

Description

Mac: Use activateIgnoringOtherApps instead of SetFrontProcessWithOptions to focus app windows Yet another attempt at finding a workaround for the two-windows-have-key- status bug that can affect packaged app windows on Mac. Currently, NativeAppWindowCocoa activates Chrome with ::SetFrontProcessWithOptions() called via +[BrowserWindowUtils activateWindowForController:]. ChromeNativeAppWindowViewsMac calls -[NSApplication activateIgnoringOtherApps:YES]. After running with the MacViews app window flag for a month I didn't encounter this bug. Minutes after disabling the flag and returning to NativeAppWindowCocoa, I got a repro. (Although, a week later, not a second repro). SetFrontProcess() is deprecated with the note in HIServices/../Processes.h: * Deprecated: * To make your own application frontmost, use * [[NSApplication sharedApplication] activateIgnoringOtherApps: YES]. SetFrontProcessWithOptions() is deprecated with the note: * Deprecated: * See SetFrontProcess(). We lose the `kSetFrontProcessFrontWindowOnly` argument to "bring only the frontmost non-floating window forward", but a quick check suggests this is the default for activateIgnoringOtherApps: anyway. SetFrontProcessWithOptions() has been around since http://crrev.com/6647009 BUG=459306 Committed: https://crrev.com/3c44dfef03524ac42b74916de37248bb4cb919c8 Cr-Commit-Position: refs/heads/master@{#342773}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm View 1 chunk +3 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (2 generated)
tapted
Hi Robert - please take a look. I'm clutching at straws really.. I tried making ...
5 years, 4 months ago (2015-08-10 04:46:57 UTC) #2
Robert Sesek
LGTM. It seems like a reasonable hypothesis that using two different activation methods could cause ...
5 years, 4 months ago (2015-08-11 00:53:40 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1278073002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1278073002/1
5 years, 4 months ago (2015-08-11 00:57:48 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 4 months ago (2015-08-11 01:43:09 UTC) #6
commit-bot: I haz the power
5 years, 4 months ago (2015-08-11 01:43:45 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/3c44dfef03524ac42b74916de37248bb4cb919c8
Cr-Commit-Position: refs/heads/master@{#342773}

Powered by Google App Engine
This is Rietveld 408576698