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

Issue 783310 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 822890
issue 823175
issue 823469



Sign in to add a comment

Minimize window doesn't work after entering-and-leaving tablet mode

Reported by wpwoo...@gmail.com, Nov 9 2017

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 9765.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.123 Safari/537.36
Platform: 9765.85.0 (Official Build) stable-channel caroline

Steps to reproduce the problem:
1. Log in as guest on Chromebook
2. Make sure existing Chrome window is maximized
3. Use Alt-Minus to minimize the window so only screen background is showing
4. Shut lid for 5 minutes, machine should be in standby
5. Open lid and click on Chrome icon in shelf to see window

What is the expected behavior?
Window remains maximized (as indicated by a double square displayed by the window maximize button), and window is able to be minimized with Alt-Minus or by pressing the minimize button.

What went wrong?
Window is not in maximized state (window maximize button shows as a single square), and will not minimize either with Alt-Minus or by pressing the minimize button

See screen shot

Did this work before? N/A 

Chrome version: 61.0.3163.123  Channel: n/a
OS Version: 9765.85.0
Flash Version: 27.0.0.170 

I leave all my windows minimized (except the ones I am working on) to save CPU/battery life (minimized windows are throttled).  This bug means I can't re-minimize a window after using it.
 
Screenshot 2017-11-09 at 2.04.46 PM.png
314 KB View Download
Cc: abodenha@chromium.org semenzato@chromium.org
Status: Available (was: Unconfirmed)
Good catch Bill, thank you.

I can reproduce this (or something similar) as follows:

1. log in as guest.  Middle icon at top right shows multiple windows
2. iconify (I used the _ icon at top right)
3. suspend, resume (no need to wait 5 minutes)
4. click Chrome icon at bottom left.  The middle icon at top right now shows a single window.

Step 3 is necessary.

I think that it's just the wrong icon and not actually the wrong state, but I'll let others figure it out.

Comment 2 by wpwoo...@gmail.com, Nov 9 2017

#1: >I think that it's just the wrong icon and not actually the wrong state

I *think* you have to wait 5 minutes in order for the in-ability to minimize to rear its ugly head.
#2 I tried waiting 5 minutes but it didn't make any difference (but I am also on 62).  Also, nothing happens between 5 seconds and 5 minutes, except possibly a "dark resume" to check battery status and possibly shut down, but that would be hard to reproduce.

If you can reproduce, please file feedback afterwards and put your gmail address in the comment (it won't get auto-attached since you're in guest mode), then add a note here.

In any case, this will get looked at.  Thanks again.

Comment 4 by wpwoo...@gmail.com, Nov 9 2017

#3 are you saying that the minimize button (and Alt-Minus) still works for you even if you wait 5 minutes, or that you can't minimize even if you come back out of standby immediately?

Comment 5 by wpwoo...@gmail.com, Nov 9 2017

#3 also I did file a feedback before posting this bug, under my gmail address, if that works
#4 I didn't describe what happens afterwards because as far as I am concerned it was enough for me to confirm that there is a bug.  Also I didn't make a mental note of it, sorry.  IIRC by clicking the middle icon twice, the correct icon appeared, but don't quote me on that.

Comment 7 by wpwoo...@gmail.com, Nov 10 2017

#3 I was unable to reproduce again with Guest, but reproduced with my gmail account and filed a feedback report just now.
Cc: brettw@chromium.org

Comment 9 by wpwoo...@gmail.com, Nov 10 2017

Another windowing issue reported here https://bugs.chromium.org/p/chromium/issues/detail?id=783805
Cc: afakhry@chromium.org x...@chromium.org
Components: -UI UI>Shell>WindowManager
Labels: -Pri-2 Pri-1
 bug 783805  is likely unrelated
Owner: warx@chromium.org
Status: Assigned (was: Available)
joe, can you please take a look?

Comment 12 by warx@chromium.org, Nov 10 2017

Status: Started (was: Assigned)
Sure

Comment 14 by wpwoo...@gmail.com, Nov 17 2017

This just happened to me on a non-maximized window.  I just filed another feedback report.

I restored a minimized window.  Looked at the info I was after, went to re-minimize the window, and now the minimize button does nothing.

Comment 15 by wpwoo...@gmail.com, Nov 18 2017

When a non-maximized window gets into this state, in addition to the minimize button not working, you cannot move the window, either with the mouse or with touch.  The only way to get the window out of this state is to press the maximize button several times.

Comment 16 by wpwoo...@gmail.com, Nov 18 2017

You can't resize a non-maximized window in this state either.  All you can do is press the maximize button 4 times, then everything is back to normal.  

The first press maximizes the window with the wallpaper behind the shelf being black.

The second press the window stays maximized and the wallpaper (behind the shelf) shows the wallpaper image.

The third press the window stays maximized and the wallpaper behind the shelf turns black.

The fourth press puts the window back to the non-maximized state where everything is working again.

I tend to leave my windows all minimized (not visible) and often when I come out of standby they are all like this.

Comment 17 by wpwoo...@gmail.com, Nov 24 2017

Sorry but is anyone looking at this?  I continue to struggle every day with windows that won't minimize or resize until I've maximized them first, then when un-maximizing they return to a different size than I had them at originally... very frustrating!

Thanks

Comment 18 by wpwoo...@gmail.com, Nov 28 2017

Chrome's "Switch Window" key is supposed to display open windows against a blurred background showing the current wallpaper.  Today I discovered that if a window with this aberrant behavior is visible while using the "switch window" key, the blurred background is not shown, the window with the issue is shown as the background instead.

Is anyone looking at this?

Comment 19 by wpwoo...@gmail.com, Nov 28 2017

I've attached a photo of my screen showing "switch window" with a browser window in the background.  Its a real mess as you can see.
20171128_092844.jpg
2.9 MB View Download
Cc: wutao@chromium.org

Comment 21 by warx@chromium.org, Dec 21 2017

Status: WontFix (was: Started)
Not able to reproduce it on 65.0.3300.0 Eve, on all the conditions (guest or user session) mentioned above, including the report in: https://feedback.corp.google.com/product/208/neutron?lView=rd&lReport=84635614933. If we think this is a RBS in m64, I would take a look at m64.

Comment 22 by wpwoo...@gmail.com, Dec 22 2017

Still an issue for me on Chrome 62.  I struggle with it every day, because I like to keep my windows minimized when not using them to minimize CPU usage and save battery life.

Comment 23 by warx@chromium.org, Dec 22 2017

OK. Thanks! Let me take a look at m64 today (I think m64 is the earliest version that could contain the fix now).

Comment 24 by warx@chromium.org, Dec 22 2017

Still not able to reproduce it on 64.0.3282.43. This may get fixed.
Still an issue on Chrome 63. In the attached you can see a window in this state, with the "Switch Window" interface layered on top of it (instead of on top of a blurred desktop wallpaper as it should be).
20180105_102905.jpg
3.5 MB View Download

Comment 26 by wpwoo...@gmail.com, Jan 22 2018

I switched to beta channel, running Version 64.0.3282.101 (Official Build) beta (64-bit)

This issue is not fixed.  Attached is an image showing a window which is not minimizable, behind the Overview screen.

This issue is extremely frustrating.  Every time after I come out of standby, my minimized windows will not re-minimize after I un-minimize them.  I have to press the "full screen" icon several times first.

How can I help to fix this?  I've also submitted a feedback referencing this  issue #783310 .
20180122_182513.jpg
2.8 MB View Download

Comment 27 by warx@chromium.org, Jan 22 2018

Cc: sdantul...@chromium.org
Status: Assigned (was: WontFix)
I cannot see the caption buttons on your browser winow, assuming it is single square...

For this UI bug, I think we would better to have a repro.

sdantuluri@, will your team manage to get a repro of this?

Comment 28 by wpwoo...@gmail.com, Jan 23 2018

#27 yes, windows in this state have a single square, even if they were maximized prior to going into standby, they come back from standby showing s single square.

It isn't hard to reproduce.  Open a bunch of windows, then minimize them all, go into standby, wait 5 minutes, then come out of standby.  Alt-tab to a window, then try to minimize it or resize it, you cannot until you click the square in the upper right a few times.

Comment 29 by wpwoo...@gmail.com, Jan 23 2018

You might have to go in and out of standby for 5-10 minutes more than once for this to start happening.
Re #27 Sure, I will try to repro the bug and update here.
I am able to repro the issue after several retries of repro steps mentioned in above comments. But I don't have exact repro steps for this.

warx@ I have my device in this state. You can have a look at it.


As reported earlier, the window in this state (calculator app window in my repro) can't be minimized or moved. 

Attached screenshot of apps in overview mode. 
Screenshot 2018-01-23 at 2.20.07 PM.png
3.4 MB View Download

Comment 33 by wpwoo...@gmail.com, Jan 29 2018

Attached you can see what happens when you go into tablet mode with a window in this state.  Instead of going full screen, the window remains the same size as it was in laptop mode.

This is not something that only happens once in a awhile.  I'm having this issue all the time because I like to minimize my windows while not using them.
Screenshot 2018-01-29 at 10.17.52 AM.png
331 KB View Download
Cc: dhadd...@chromium.org mkarkada@chromium.org abod...@chromium.org
warx@ Repro steps on M65 10323.24.0, 65.0.3325.59

(1) Open some app like Settings or Files app
(2) Click on the app icon from shelf. App window is minimized
(3) Switch device to tablet mode
(4) Switch device back to normal mode
(5) Click on the app icon from the shelf. App window is restored.
(6) Now try to minimize the app by clicking the app icon in shelf or by clicking minimize icon on app window

Result: App won't minimize

Comment 35 by warx@chromium.org, Feb 9 2018

OK, thanks for the reliable repro steps.
This bug is essentially a tablet mode bug. When we close lid for convertibles, it may enter tablet mode and then exit tablet mode:  issue 790720 .


Wow, no wonder it was so hard to reproduce reliably! It seems to be dependent on how you close the lid, unless you intentionally go into tablet mode.

Comment 37 by warx@chromium.org, Feb 9 2018

Status: Started (was: Assigned)
Summary: Minimize window function not entering-and-leaving tablet mode (was: Minimize window function not working after return from standby)
Yes, this really needs investigation. I am kicking off.
Project Member

Comment 38 by bugdroid1@chromium.org, Feb 13 2018

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

commit b6f3f2bea1a5b9af6694611cc55c304de265956b
Author: Qiang Xu <warx@google.com>
Date: Tue Feb 13 08:08:50 2018

cros: fix cannot minimize window after leaving tablet mode

changes:
When leaving tablet mode, we will restore old state, which will finally
call BaseState::UpdateMinimizedState. If a window is minimized at this
time, it will set |aura::client::kPreMinimizedShowStateKey| to
minimized show state. It doesn't make sense to set pre-minimized show
state to minimized show state, which could leave us in a bad window state.

Bug:  783310 ,  810857 
Test: emulator test and added test coverage
Change-Id: I0c084774a838c0c0b9f3b516011ff31679ae770b
Reviewed-on: https://chromium-review.googlesource.com/914981
Commit-Queue: Qiang Xu <warx@google.com>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536285}
[modify] https://crrev.com/b6f3f2bea1a5b9af6694611cc55c304de265956b/ash/wm/base_state.cc
[modify] https://crrev.com/b6f3f2bea1a5b9af6694611cc55c304de265956b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc

Comment 39 by warx@chromium.org, Feb 13 2018

Labels: Merge-Request-65
Summary: Minimize window doesn't work after entering-and-leaving tablet mode (was: Minimize window function not entering-and-leaving tablet mode)
We may want to merge this fix to M65, although it is not a regression. The reason I have is, it is a one line fix with test coverage.

Comment 40 by wpwoo...@gmail.com, Feb 13 2018

#38 I have a question, hope you don't mind :)

The fix does a check:
previous_state_type != mojom::WindowStateType::MINIMIZED

Further down, I see a similar check as:
IsMinimizedWindowState(previous_state_type)

Why do it two different ways?

Thanks!

Comment 41 by warx@chromium.org, Feb 13 2018

You are right, IsMinimizedWindowState should be better, thanks for the catch.
Project Member

Comment 42 by sheriffbot@chromium.org, Feb 14 2018

Labels: -Merge-Request-65 Merge-Review-65 Hotlist-Merge-Review
This bug requires manual review: M65 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 44 by wpwoo...@gmail.com, Feb 15 2018

#43 nice cleanup!  
Labels: -Hotlist-Merge-Review -Merge-Review-65 Merge-Approved-65
Project Member

Comment 46 by bugdroid1@chromium.org, Feb 20 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8088889998a4cf81163f79faccb72e7e9a39337a

commit 8088889998a4cf81163f79faccb72e7e9a39337a
Author: Qiang Xu <warx@google.com>
Date: Tue Feb 20 21:20:59 2018

m65 merge: cros: fix cannot minimize window after leaving tablet mode

changes:
When leaving tablet mode, we will restore old state, which will finally
call BaseState::UpdateMinimizedState. If a window is minimized at this
time, it will set |aura::client::kPreMinimizedShowStateKey| to
minimized show state. It doesn't make sense to set pre-minimized show
state to minimized show state, which could leave us in a bad window state.

TBR=jamescook@chromium.org

(cherry picked from commit b6f3f2bea1a5b9af6694611cc55c304de265956b)

Bug:  783310 ,  810857 
Test: emulator test and added test coverage
Change-Id: I0c084774a838c0c0b9f3b516011ff31679ae770b
Reviewed-on: https://chromium-review.googlesource.com/914981
Commit-Queue: Qiang Xu <warx@google.com>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#536285}
Reviewed-on: https://chromium-review.googlesource.com/927357
Reviewed-by: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/branch-heads/3325@{#517}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/8088889998a4cf81163f79faccb72e7e9a39337a/ash/wm/base_state.cc
[modify] https://crrev.com/8088889998a4cf81163f79faccb72e7e9a39337a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc

Comment 47 by warx@chromium.org, Feb 20 2018

Labels: M-65
Status: Fixed (was: Started)
Fixed in M65
I've been testing this in M65 beta.  Its better, but there are still two issues that I have found.  I'll describe them in separate comments.

Minimized window appears in wrong state after going into tablet mode:
1) Open a maximized Chrome window.
2) Minimize it by pressing the horizontal underscore icon at the upper right (next to the maximize icon).  
3) Go into tablet mode.  
4) Go out of tablet mode.  
5) Alt-tab to view the window.

Expected result: Window is still maximized

Actual result: Window appears as if un-maximized (single square box at upper right), but if you try to maximize it doesn't work, instead it goes to the un-maximized state first, then if you maximize again it works
This one is similar to the last one:

1) Open a maximized Chrome window.
2) Minimize it by pressing the horizontal underscore icon at the upper right (next to the maximize icon).  
3) Go into tablet mode.
4) Touch the Chrome icon on the shelf to open the window
5) Minimize the window again by pressing the underscore icon  
4) Go out of tablet mode.  
5) Alt-tab to view the window.

Expected result: Window is still maximized

Actual result: Window appears as if un-maximized (single square box at upper right), but if you try to maximize it doesn't work, instead it does nothing.  Then if you try to maximize it again it goes to un-maximized state.  The if you maximize a third time it works.
I found another issue:

1) Open a maximized Chrome window.
2) Minimize it by pressing the horizontal underscore icon at the upper right (next to the maximize icon).  
3) Go into tablet mode.
4) Touch the Chrome icon on the shelf to open the window
5) Go out of tablet mode.

Expected result: Window is still maximized

Actual result: Window has been minimized when coming out of tablet mode and is no longer visible.

Similarly, if you have a visible window, go into tablet mode, then minimize it, then come out of tablet mode, the window comes out of the minimized state and is visible.
Finally:

1) Open a maximized Chrome window.
2) Un-maximize it
2) Minimize it by pressing the horizontal underscore icon at the upper right (next to the maximize icon).  
3) Go into tablet mode.
4) Touch the Chrome icon on the shelf to open the window
5) Go out of tablet mode.

Expected result: Window is still visible in un-maximized state

Actual result: Window has been minimized when coming out of tablet mode and is no longer visible.  Pressing Alt-tab makes window visible in a full-screen un-maximized state, and it takes four (4!!) clicks on the maximize button to get it to actually maximize.

Comment 52 by wpwoo...@gmail.com, Mar 13 2018

Any thoughts on these remaining issues?  It's very frustrating that window state is not maintained when switching between tablet and clamshell modes. 

Comment 53 by warx@chromium.org, Mar 13 2018

Status: Assigned (was: Fixed)
(Sorry last time checked on phone and then forgot about it) I am opening it. Definitely there are bugs here. Another related bug is  issue 811352 . We really need to think more of minimized window state in tablet mode and correctly exit/restore.

Comment 54 by wpwoo...@gmail.com, Mar 14 2018

Possibly related, I have noticed that sometimes the Search key stops working when all windows are minimized in clamshell mode.  When you press it nothing happens, it does not bring up the app list.  I think this occurs after going into tablet mode and then back to clamshell mode.  

Comment 55 by wpwoo...@gmail.com, Mar 14 2018

#53 My expectations for coming back from tablet mode to clamshell mode are:

1) Windows that were not in a minimized state in tablet mode are still not minimized after returning from clamshell mode
2) Windows that were in a minimized state in tablet mode are still minimized after returning to clamshell mode
3) When a window first becomes visible after a return from tablet mode to clamshell mode, the window retains the size, position, and state (maximized or not maximized) that it had when it was last seen in clamshell mode (before going into tablet mode and back out again)

Comment 56 by warx@chromium.org, Mar 16 2018

Blockedon: 822890

Comment 57 by warx@chromium.org, Mar 19 2018

Blockedon: 823175

Comment 58 by warx@chromium.org, Mar 19 2018

Blockedon: 823469

Comment 59 by warx@chromium.org, Mar 19 2018

As a summary, wpwoodjr@ filed four bugs  #48 ,  #49 ,  #50 /#51 (50 and 51 are the same root cause). I filed them into separate bugs. 

#48 is  issue 822890 , cl uploaded: https://chromium-review.googlesource.com/c/chromium/src/+/967414

#49 is  issue 823175 , cl uploaded: https://chromium-review.googlesource.com/c/chromium/src/+/969455

#50/#51 is  issue 823469 , cl uploaded: https://chromium-review.googlesource.com/c/chromium/src/+/969621

Thanks again for filing those bugs.

And for #54, what is your chrome version? It sounds like this  issue 780146 , which is fixed in m65. If you see it again, please file a separate bug. Thanks
Project Member

Comment 60 by bugdroid1@chromium.org, Mar 21 2018

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

commit 526cc33b6e631f8b02daac102a91111462143914
Author: Qiang Xu <warx@google.com>
Date: Wed Mar 21 19:00:01 2018

cros: do not clear kPreMinimizedShowStateKey in tablet mode

changes:
Do not clear kPreMinimizedShowStateKey in tablet mode, instead let it
persist before/after tablet mode.

Bug:  823175 ,  783310 
Test: manual test and added test coverage.
Change-Id: Icec1675da9c7d1b5b955ae5c05a71d96547afeee
Reviewed-on: https://chromium-review.googlesource.com/969455
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#544789}
[modify] https://crrev.com/526cc33b6e631f8b02daac102a91111462143914/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
[modify] https://crrev.com/526cc33b6e631f8b02daac102a91111462143914/ash/wm/window_state.cc
[modify] https://crrev.com/526cc33b6e631f8b02daac102a91111462143914/ui/wm/core/window_util.cc

Project Member

Comment 61 by bugdroid1@chromium.org, Mar 22 2018

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

commit 97524c138aa402ef7fcf06834c37173edde481fc
Author: Qiang Xu <warx@google.com>
Date: Thu Mar 22 17:37:54 2018

cros: do not update caption buttons on minimized window

changes:
Toggle tablet mode is set to update caption buttons to update size
button visibility. In minimized state, frame is not maximized or
fullscreen, thus the size button will be set to MAXIMIZE button not
RESTORE button. This CL avoids such update when window is minimized.

Bug:  822890 ,  783310 
Test: manual test and added test coverage
Change-Id: Id35db6dcfbc79e6783caf8706fb83d25402f9c21
Reviewed-on: https://chromium-review.googlesource.com/967414
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#545133}
[modify] https://crrev.com/97524c138aa402ef7fcf06834c37173edde481fc/ash/frame/caption_buttons/frame_caption_button.h
[modify] https://crrev.com/97524c138aa402ef7fcf06834c37173edde481fc/ash/frame/default_frame_header.cc
[modify] https://crrev.com/97524c138aa402ef7fcf06834c37173edde481fc/chrome/browser/ui/views/frame/browser_frame_header_ash.cc
[modify] https://crrev.com/97524c138aa402ef7fcf06834c37173edde481fc/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h
[modify] https://crrev.com/97524c138aa402ef7fcf06834c37173edde481fc/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc

Comment 62 by warx@chromium.org, Mar 23 2018

Status: Fixed (was: Assigned)
All issues are fixed.

Comment 63 by wpwoo...@gmail.com, Mar 23 2018

#59, great news that these are fixed!!  Will they hopefully be merged into m65?

My Chrome version for the issue with the search key was CrOS 64.  I will report again if I see it in m65.  Thanks!
Project Member

Comment 64 by bugdroid1@chromium.org, Mar 23 2018

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

commit 74e2582a9fd6ad68fe0136c353bef26b93f16b72
Author: Qiang Xu <warx@google.com>
Date: Fri Mar 23 00:04:15 2018

cros: sync unminimized state when attaching state if necessary

changes:
When attaching state, if previous state is unminimized but the stored
window state is minimized, we should sync the state to unminimized state,
which is determined by pre-minimized window show state.

Bug:  823469 ,  783310 ,  811352 
Test: manual test and added test coverage
Change-Id: I32a4e119e12ebefa015713ac535768880d8b4832
Reviewed-on: https://chromium-review.googlesource.com/969621
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#545295}
[modify] https://crrev.com/74e2582a9fd6ad68fe0136c353bef26b93f16b72/ash/wm/default_state.cc
[modify] https://crrev.com/74e2582a9fd6ad68fe0136c353bef26b93f16b72/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc

Comment 65 by warx@chromium.org, Mar 23 2018

I don't recommend M65 since it is already stable.

Even for M66, I doubt we should do that. They are not regressions (I mean they should be there for a while since we introduced tablet mode). And I wonder the badness of minimized window state is severe enough for back-porting.

There are three CLs here. See #59 for more details. I will leave the decision to abodenha@.

Comment 66 by wpwoo...@gmail.com, Mar 23 2018

#65 except the experience for people using minimized windows could not be worse really.  So I think its better to get these in sooner than later.
warx@ how risky is the change?  

Looks like 25loc + tests in default_state which I agree is too risky for 65.  We've still got a few weeks in 66 though. The experience is bad enough that I'd be supportive of a merge unless you're particularly concerned about breakage.

Comment 68 by warx@chromium.org, Mar 23 2018

Cc: josa...@chromium.org
Labels: M-66 Merge-Request-66
Status: Assigned (was: Fixed)
https://chromium-review.googlesource.com/c/chromium/src/+/967414
https://chromium-review.googlesource.com/c/chromium/src/+/969455

These two CLs are early return fix, which I believe is pretty safe.

https://chromium-review.googlesource.com/c/chromium/src/+/969621 is less safe but with existing test cases and added test case. It should be good enough.

I am also supportive on merging back if no objections. Thanks

Project Member

Comment 69 by sheriffbot@chromium.org, Mar 24 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-66 Merge-Approved-66
Project Member

Comment 71 by bugdroid1@chromium.org, Mar 26 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2eb960c8036afcd2b09eb768e9aff390eeb439f8

commit 2eb960c8036afcd2b09eb768e9aff390eeb439f8
Author: Qiang Xu <warx@google.com>
Date: Mon Mar 26 16:40:05 2018

m66 merge: cros: do not update caption buttons on minimized window

changes:
Toggle tablet mode is set to update caption buttons to update size
button visibility. In minimized state, frame is not maximized or
fullscreen, thus the size button will be set to MAXIMIZE button not
RESTORE button. This CL avoids such update when window is minimized.

TBR=sky@chromium.org

(cherry picked from commit 97524c138aa402ef7fcf06834c37173edde481fc)

Bug:  822890 ,  783310 
Test: manual test and added test coverage
Change-Id: Id35db6dcfbc79e6783caf8706fb83d25402f9c21
Reviewed-on: https://chromium-review.googlesource.com/967414
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#545133}
Reviewed-on: https://chromium-review.googlesource.com/980822
Reviewed-by: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/branch-heads/3359@{#431}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/2eb960c8036afcd2b09eb768e9aff390eeb439f8/ash/frame/caption_buttons/frame_caption_button.h
[modify] https://crrev.com/2eb960c8036afcd2b09eb768e9aff390eeb439f8/ash/frame/default_frame_header.cc
[modify] https://crrev.com/2eb960c8036afcd2b09eb768e9aff390eeb439f8/chrome/browser/ui/views/frame/browser_frame_header_ash.cc
[modify] https://crrev.com/2eb960c8036afcd2b09eb768e9aff390eeb439f8/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h
[modify] https://crrev.com/2eb960c8036afcd2b09eb768e9aff390eeb439f8/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc

Project Member

Comment 72 by bugdroid1@chromium.org, Mar 26 2018

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

commit d0b6126a6bcab9531ec25851e56d2976a495ab96
Author: Qiang Xu <warx@google.com>
Date: Mon Mar 26 16:42:56 2018

m66 merge: cros: do not clear kPreMinimizedShowStateKey in tablet mode

changes:
Do not clear kPreMinimizedShowStateKey in tablet mode, instead let it
persist before/after tablet mode.

TBR=sky@chromium.org

(cherry picked from commit 526cc33b6e631f8b02daac102a91111462143914)

Bug:  823175 ,  783310 
Test: manual test and added test coverage.
Change-Id: Icec1675da9c7d1b5b955ae5c05a71d96547afeee
Reviewed-on: https://chromium-review.googlesource.com/969455
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#544789}
Reviewed-on: https://chromium-review.googlesource.com/980794
Reviewed-by: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/branch-heads/3359@{#432}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/d0b6126a6bcab9531ec25851e56d2976a495ab96/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
[modify] https://crrev.com/d0b6126a6bcab9531ec25851e56d2976a495ab96/ash/wm/window_state.cc
[modify] https://crrev.com/d0b6126a6bcab9531ec25851e56d2976a495ab96/ui/wm/core/window_util.cc

Project Member

Comment 73 by bugdroid1@chromium.org, Mar 26 2018

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

commit 8ae7191a947988481fe20950e59830786915635b
Author: Qiang Xu <warx@google.com>
Date: Mon Mar 26 16:45:27 2018

m66 merge: cros: sync unminimized state when attaching state if necessary

changes:
When attaching state, if previous state is unminimized but the stored
window state is minimized, we should sync the state to unminimized state,
which is determined by pre-minimized window show state.

TBR=oshima@chromium.org

(cherry picked from commit 74e2582a9fd6ad68fe0136c353bef26b93f16b72)

Bug:  823469 ,  783310 ,  811352 
Test: manual test and added test coverage
Change-Id: I32a4e119e12ebefa015713ac535768880d8b4832
Reviewed-on: https://chromium-review.googlesource.com/969621
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#545295}
Reviewed-on: https://chromium-review.googlesource.com/980824
Reviewed-by: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/branch-heads/3359@{#434}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/8ae7191a947988481fe20950e59830786915635b/ash/wm/default_state.cc
[modify] https://crrev.com/8ae7191a947988481fe20950e59830786915635b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc

Comment 74 by warx@chromium.org, Mar 26 2018

Status: Fixed (was: Assigned)
Fixes merged to M66.

Comment 75 by wutao@chromium.org, Apr 10 2018

Cc: warx@chromium.org
 Issue 828421  has been merged into this issue.

Comment 76 by wpwoo...@gmail.com, Apr 10 2018

Still seeing a few issues on Chrome 66.0.3359.79:
Issue 1: window that was hidden in tablet mode re-appears when returning to clamshell mode

1) Open a maximized or unmaximized Chrome window.
2) Go into tablet mode.
3) Minimize it by pressing the horizontal underscore icon at the upper right .  
4) Go out of tablet mode to clamshell mode

Expected result: Window is still hidden

Actual result: Window re-appears in clamshell mode

Comment 77 by warx@chromium.org, Apr 10 2018

Status: Assigned (was: Fixed)
Re 76, right, sadly this is another bug, will work on a fix for it.

Comment 78 by warx@chromium.org, Apr 10 2018

Cc: omrilio@chromium.org osh...@chromium.org
+Omri, what do you think of the behavior in #76? We don't bring tablet mode maximized state to clamshell, shall we bring tablet mode minimized state to clamshell?

Comment 79 by wpwoo...@gmail.com, Apr 10 2018

I can't seem to reproduce these other issues right now:

 Issue 2 : unmaximised window becomes partially maximised eg double square but bottom is raised after going into/out of tablet mode

 Issue 3 : unmaximised window moves upwards after minimizing, going into tablet mode, view window, hide/unhide shelf, go back to clamshell mode

Both of these were happening but I can't reproduce.  It's as if the hide/unhide of the shelf in tablet mode pushed the window upwards in clamshell mode.  BTW I configured my shelf on the right, auto hide.

Comment 80 by wpwoo...@gmail.com, Apr 10 2018

#78, when window is visible in tablet mode, it is still visible in original clamshell mode state (maximised or unmaximised) when returning to clamshell mode, which is good.  #76 asks for no surprise (re-appearing window) when returning to clamshell mode.

Comment 81 by wpwoo...@gmail.com, Apr 10 2018

Oops another bug.  
1) Open window in Chrome
2) Minimize it
3) Go to tablet mode
4) Press Chrome icon to view window.  List of Chrome windows also appears.
5) Go to clamshell mode while window list is still visible

Expected result: List of windows disappears

Actual result: List of windows is still visible and unattached to Chrome icon.  See screenshot.
Screenshot 2018-04-10 at 3.48.04 PM.png
1.3 MB View Download

Comment 82 by warx@chromium.org, Apr 11 2018

Status: Fixed (was: Assigned)
Re #81, cannot reproduce it on m67. I will file #76 to another bug.

Let us just close this bug. It has been too long and already contains multiple issues. I think it is preferred to keep issue in separate bugs.

Sign in to add a comment