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

Issue 2395083003: Use -[NSApp activateIgnoringOtherApps:NO] instead of -[NSRunningApplication activateWithOptions:]. (Closed)

Created:
4 years, 2 months ago by Robert Sesek
Modified:
4 years, 2 months ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use -[NSApp activateIgnoringOtherApps:NO] instead of -[NSRunningApplication activateWithOptions:]. In c57771b074f8, +[BrowserWindowUtils activateWindowController:] was changed from using Carbon's SetFrontProcessWithOptions(). This caused an activation bug, https://crbug.com/653483, to occur. The difference in behavior is because the NSApplication method internally calls _NXActivateSelf(), which uses SetFrontProcessWithOptions(). The NSRunningApplication method instead messages LaunchServices to set the front process. The NSRunningApplication method appers to deactivate the app if it is currently active, which caused the bug. Switching to the NSApplication method resolves the issue and restores the old behavior. An alternatieve to using the NSApplication method would be to make calling the NSRunningApplication method conditional on -[NSApp isActive]. BUG=653483, 650845 R=avi@chromium.org Committed: https://crrev.com/6d3dbe8eb6ff81ed2c9e89df2e13d1764056e9d7 Cr-Commit-Position: refs/heads/master@{#423590}

Patch Set 1 #

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

Messages

Total messages: 13 (8 generated)
Robert Sesek
4 years, 2 months ago (2016-10-06 16:45:03 UTC) #3
Avi (use Gerrit)
lgtm
4 years, 2 months ago (2016-10-06 18:07:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2395083003/1
4 years, 2 months ago (2016-10-06 18:08:40 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-06 18:15:07 UTC) #11
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 18:17:34 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/6d3dbe8eb6ff81ed2c9e89df2e13d1764056e9d7
Cr-Commit-Position: refs/heads/master@{#423590}

Powered by Google App Engine
This is Rietveld 408576698