New issue
Advanced search Search tips

Issue 888218 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

REGRESSION: "restart to update" doesn't restore minimized windows as minimized

Project Member Reported by thakis@chromium.org, Sep 22

Issue description

Chrome Version       : 70.0.3538.22

What steps will reproduce the problem?
1. Open a few Windows, minimize some of them
2. chrome://restart (with "Start where I left off" checked in prefs)

What is the expected result?

Chrome restores all windows, and restores the minimized windows as minimized windows.


What happens instead of that?

The minimized windows are restored as regular, non-minimized windows.


This used to work, probably a regression from the views switch?
 
Components: -UI UI>Browser>Sessions
Labels: -Type-Bug -Pri-3 Proj-MacViews Pri-1 Type-Bug-Regression
Yes, probably caused by the switch to MacViews.
Cc: phanindra.mandapaka@chromium.org
 Issue 884987  has been merged into this issue.
Labels: MacViews-Browser
Owner: ellyjo...@chromium.org
Status: Assigned (was: Untriaged)
Labels: -Pri-1 Target-72 M-72 Pri-2
Summary: REGRESSION: "restart to update" doesn't restore minimized windows as minimized (was: "restart to update" doesn't restore minimized windows as minimized)
Labels: -Pri-2 -M-72 -Target-72 Target-71 M-71 Pri-1
I believe I have a fix: <https://chromium-review.googlesource.com/c/chromium/src/+/1268396>. It introduces a graphical glitch while deminiaturizing windows though.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 16

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

commit 129abeac557646a4c99fdc9f27b00989b7fd36c1
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Tue Oct 16 13:25:07 2018

mac: fix restoring minimized windows

This change:
1) Has BridgedNativeWidgetHostImpl notify the owning Widget when it becomes
   minimized
2) Has session restore not activate minimized browser windows when selecting
   a restored tab
3) Has session restore not show a newly created browser window if it's
   minimized

restore save; without this change, the widget will not get saved as minimized.
window. On Mac, showing/activating a window implies de-minimizing it, so this
is required to avoid de-minimizing saved minimized windows, but I think it is
necessary on other platforms as well.

Test steps:
1) Start Chromium
2) Create a second browser window (cmd-n) and minimize it
3) In the first window, chrome://restart

Before this change, both browser windows appear after restart; after this
change, the first window appears and the second stays minimized.

Note that there is a graphical glitch when first restoring a window that is
minimized this way: the window paints as blank for a few frames while running
the deminiaturize animation.

Bug:  888218 
Change-Id: I8ac121408336a7d6aeedd2b27cd2c9c9d20a18f2
Reviewed-on: https://chromium-review.googlesource.com/c/1268396
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599961}
[modify] https://crrev.com/129abeac557646a4c99fdc9f27b00989b7fd36c1/chrome/browser/sessions/session_restore_browsertest_chromeos.cc
[modify] https://crrev.com/129abeac557646a4c99fdc9f27b00989b7fd36c1/chrome/browser/ui/browser_tabrestore.cc
[modify] https://crrev.com/129abeac557646a4c99fdc9f27b00989b7fd36c1/ui/views/cocoa/bridged_native_widget_host_impl.mm
[modify] https://crrev.com/129abeac557646a4c99fdc9f27b00989b7fd36c1/ui/views/widget/native_widget_mac.mm

Cc: sdy@chromium.org ccameron@chromium.org
ccameron@, sdy@: can you take a peek at the graphical glitch mentioned in the CL description? I don't know how to fix that.
My guess would be that we're setting the ui::Compositor to be locked when minimized at some level. It's not clear that we do that from a quick look at the code, but it should be find-able.
Did the cocoa browser have that glitch?
It wouldn't have -- it didn't use a ui::Compositor to draw UI.
#10: Can you take a peek? :)
Labels: Merge-Request-71
I want to soak this on canary for a couple of days, but requesting merge to M71.
Project Member

Comment 15 by sheriffbot@chromium.org, Oct 19

Labels: -Merge-Request-71 Hotlist-Merge-Approved Merge-Approved-71
Your change meets the bar and is auto-approved for M71. Please go ahead and merge the CL to branch 3578 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge your change to M71 branch #3578 ASAP so we can pick it up for next M71 Beta release. Thank you.
Pls merge your change to M71 branch 3578 latest by 1:00 PM PT, Monday, 10/22 so we can pick it up for next week beta release. Thank you. 
Project Member

Comment 19 by bugdroid1@chromium.org, Oct 22

Labels: -merge-approved-71 merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f474595943481cff06bb6fc23ce5f1464c39b515

commit f474595943481cff06bb6fc23ce5f1464c39b515
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Mon Oct 22 12:56:12 2018

mac: fix restoring minimized windows

This change:
1) Has BridgedNativeWidgetHostImpl notify the owning Widget when it becomes
   minimized
2) Has session restore not activate minimized browser windows when selecting
   a restored tab
3) Has session restore not show a newly created browser window if it's
   minimized

restore save; without this change, the widget will not get saved as minimized.
window. On Mac, showing/activating a window implies de-minimizing it, so this
is required to avoid de-minimizing saved minimized windows, but I think it is
necessary on other platforms as well.

Test steps:
1) Start Chromium
2) Create a second browser window (cmd-n) and minimize it
3) In the first window, chrome://restart

Before this change, both browser windows appear after restart; after this
change, the first window appears and the second stays minimized.

Note that there is a graphical glitch when first restoring a window that is
minimized this way: the window paints as blank for a few frames while running
the deminiaturize animation.

Bug:  888218 
Change-Id: I8ac121408336a7d6aeedd2b27cd2c9c9d20a18f2
Reviewed-on: https://chromium-review.googlesource.com/c/1268396
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#599961}(cherry picked from commit 129abeac557646a4c99fdc9f27b00989b7fd36c1)
Reviewed-on: https://chromium-review.googlesource.com/c/1293551
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#203}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/f474595943481cff06bb6fc23ce5f1464c39b515/chrome/browser/sessions/session_restore_browsertest_chromeos.cc
[modify] https://crrev.com/f474595943481cff06bb6fc23ce5f1464c39b515/chrome/browser/ui/browser_tabrestore.cc
[modify] https://crrev.com/f474595943481cff06bb6fc23ce5f1464c39b515/ui/views/cocoa/bridged_native_widget_host_impl.mm
[modify] https://crrev.com/f474595943481cff06bb6fc23ce5f1464c39b515/ui/views/widget/native_widget_mac.mm

Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/f474595943481cff06bb6fc23ce5f1464c39b515

Commit: f474595943481cff06bb6fc23ce5f1464c39b515
Author: ellyjones@chromium.org
Commiter: ellyjones@chromium.org
Date: 2018-10-22 12:56:12 +0000 UTC

mac: fix restoring minimized windows

This change:
1) Has BridgedNativeWidgetHostImpl notify the owning Widget when it becomes
   minimized
2) Has session restore not activate minimized browser windows when selecting
   a restored tab
3) Has session restore not show a newly created browser window if it's
   minimized

restore save; without this change, the widget will not get saved as minimized.
window. On Mac, showing/activating a window implies de-minimizing it, so this
is required to avoid de-minimizing saved minimized windows, but I think it is
necessary on other platforms as well.

Test steps:
1) Start Chromium
2) Create a second browser window (cmd-n) and minimize it
3) In the first window, chrome://restart

Before this change, both browser windows appear after restart; after this
change, the first window appears and the second stays minimized.

Note that there is a graphical glitch when first restoring a window that is
minimized this way: the window paints as blank for a few frames while running
the deminiaturize animation.

Bug:  888218 
Change-Id: I8ac121408336a7d6aeedd2b27cd2c9c9d20a18f2
Reviewed-on: https://chromium-review.googlesource.com/c/1268396
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#599961}(cherry picked from commit 129abeac557646a4c99fdc9f27b00989b7fd36c1)
Reviewed-on: https://chromium-review.googlesource.com/c/1293551
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#203}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}

Sign in to add a comment