New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 917433 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

App focus jumps around when hiding Chrome to switch to a PWA

Project Member Reported by sdy@chromium.org, Dec 21

Issue description

Chrome Version: 73.0.3646.0
OS: macOS 10.14

What steps will reproduce the problem?
(1) Have windows open in at least three applications: Chrome, a PWA, and an unrelated app.
(2) Click the unrelated app's window, then the PWA's window, then the Chrome window, to put them in the right order for the bug.
(3) Hide Chrome with cmd+h or Chrome > Hide Chrome in the menu bar.

What is the expected result?
Chrome disappears and the PWA gets focus.

What happens instead?
Focus flickers between the PWA and the other app and eventually ends up on the PWA.

I would guess that this is machinery for old-style apps (which fake focus) that just needs to be disabled when switching to an app shim with remote windows.
 
chrome_hide_app_switch_flicker.mp4
440 KB View Download
Owner: sdy@chromium.org
Status: Assigned (was: Untriaged)
Tentatively self-assigning.
This is leftover goo from non-RemoteMacViews (3 lines that can be "if (!rmv)"-ed).
Labels: -Pri-3 Pri-1
-> P1

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa

commit 9909e9bf8901db1eeb9a07431c3e7aeb0da163fa
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Dec 27 02:12:18 2018

RemoteMacViews: Disable non-RemoteMacViews behaviors

Non-RemoteMacViews has behaviors to focus, show, and hide browser
windows based on interactions with the app shim process, to simulate
the NSWindows belonging to the app shim process. For hosted apps, this
isn't needed anymore.

Add state to AppShimHost to track if an app is using RemoteMacViews,
and if so, skip all of these behaviors.

Bug:  917433 , 904529
Change-Id: I2de17450ec51c6a855a6816fad4d6ccfc0d4f300
Reviewed-on: https://chromium-review.googlesource.com/c/1389950
Commit-Queue: ccameron <ccameron@chromium.org>
Reviewed-by: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618992}
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/apps/app_shim/app_shim_host_mac.cc
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/apps/app_shim/app_shim_host_mac.h
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/apps/app_shim/extension_app_shim_handler_mac.cc
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
[modify] https://crrev.com/9909e9bf8901db1eeb9a07431c3e7aeb0da163fa/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm

Status: Fixed (was: Assigned)

Sign in to add a comment