Issue metadata
Sign in to add a comment
|
After updating, new chrome windows open in background.
Reported by
br...@digital-traffic.net,
Apr 25 2016
|
||||||||||||||||||||||||
Issue descriptionChrome Version : 49.0.2623.112 OS Version: Windows 10 URLs (if applicable) : n/a Other browsers tested: n/a What steps will reproduce the problem? 1. Allow chrome to update itself and restart 2. Select a different application. 3. Middle-Click the Chrome icon in the taskbar to open a new window. What is the expected result? The new chrome window should open in front of the previously selected application, and have focus. What happens instead of that? The new chrome window opens behind the previously selected window and does not have focus. In the worst cases, it may appear that no new chrome window has opened, at all, because it's completely hidden. Please provide any additional information below. Attach a screenshot if possible. After step 2 in the attached Problem Steps Recorder report, the chrome window should be in focus, but it is not. Rebooting the computer seems to fix this behavior until the next chrome update. UserAgentString: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
,
Apr 27 2016
No, it appears that I missed something. The only thing I can think of, off the top of my head, is that the hamburger icon was orange when I updated, and I clicked the update and restart menu item rather than going into about and allowing it to update. I followed the same steps as in the screencast just a moment ago and I couldn't reproduce the problem. Are there any instructions on how to repeat update-related issues? I'm not sure how to repro the update process without just waiting for a new update to come in, which would make it pretty difficult to test. Perhaps I could take a snapshot of a VM so I could roll back and try different things... Any input on that would be appreciated.
,
Apr 28 2016
Thank you for providing more feedback. Adding requester "durga.behera@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 29 2016
Thanks much for the feedback. Have looped the related dev group to help further triage the same.
,
May 2 2016
I just reproduced the problem with the latest update. I'm attaching a PSR report. Hopefully this is of some benefit. Please let me know if there's anything else I can do to assist.
,
Aug 8 2016
Thanks for the detailed steps. I was able to reproduce this. It seems that GetStartupInfo returns SW_SHOW in the bad case rather than SW_SHOWNORMAL. I think that relaunching the browser should use SW_SHOWNORMAL rather than SW_SHOW (see launch_win.cc's LaunchProcess). Should we always use this when launching any process (MSDN says "An application should specify this flag when displaying the window for the first time." here: https://msdn.microsoft.com/library/windows/desktop/ms633548.aspx). CCing a few others to see if this makes sense or not.
,
Aug 8 2016
,
Aug 8 2016
That sounds reasonable to me based on the docs, but I'm not that familiar.
,
May 3 2017
This sounds very much like issue 178742 . A ShowWindow issue would explain why this is easier to reproduce after an update/restart. @brian and anyone else interested in reproducing outside of updates: I've found visiting chrome://restart reliably triggers this issue.
,
Jun 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b394d18f263bb63178bcfee2e248f96d0c593f42 commit b394d18f263bb63178bcfee2e248f96d0c593f42 Author: Greg Thompson <grt@chromium.org> Date: Thu Jun 29 22:08:46 2017 Use SW_SHOWNORMAL when launching non-hidden procs on Windows. The "show" state of an app's initial window is set by the launching process via the wShowWindow field of a STARTUPINFO struct. This indicates, for example, whether the initial app window should be visible or not. When launching a non-hidden process, Chrome should tell that proc to make itself visible. This has historically been done via SW_SHOW, which is documented as: "Activates the window and displays it in its current size and position." That sounds good, but wait until you hear what SW_SHOWNORMAL does: "Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time." That sounds pretty good. SW_SHOWNORMAL is indeed what the shell uses when it launches Chrome as a result of a user clicking Chrome's task bar icon or Start Menu shortcut. This makes SW_SHOWNORMAL fairly compelling on its own. The situation gets a bit more interesting when we look at how Chrome itself handles this initial show state. Chrome consults the initial show state when deciding how to handle the opening of any new browser window. SW_SHOWNORMAL is the indication that the new window should be in the foreground and active. This works great when Chrome is launched from the Windows shell. When Chrome relaunches itself using SW_SHOW, however, new windows end up going behind existing ones. This is not so good. So let's just use SW_SHOWNORMAL as we should have all along, and all should be well with the world. BUG= 178742 , 606510 R=scottmg@chromium.org,gab@chromium.org Change-Id: I40a55c4746217b8ab3827049d1d7ab040c96ef51 Reviewed-on: https://chromium-review.googlesource.com/552643 Reviewed-by: Scott Graham <scottmg@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Greg Thompson <grt@chromium.org> Cr-Commit-Position: refs/heads/master@{#483511} [modify] https://crrev.com/b394d18f263bb63178bcfee2e248f96d0c593f42/base/process/launch_win.cc |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by durga.behera@chromium.org
, Apr 27 2016Labels: Needs-Feedback M-50
1.4 MB
1.4 MB Download