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

Issue 624806 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocked on:
issue 642809



Sign in to add a comment

Status bubble is vertically offset after switching desktops

Project Member Reported by derat@chromium.org, Jun 30 2016

Issue description

Google Chrome	51.0.2704.103 (Official Build) (64-bit)
Platform	8172.60.0 (Official Build) stable-channel samus

1. Sign in as two users.
2. Make sure that "Autohide shelf" is unchecked.
3. Resize a browser window so its bottom touches the top of the shelf.
4. Start loading a page.
5. Switch to the other user and then back.

The browser window's status bubble is a few pixels higher than it should be. If I hover over it, it jumps to the right spot, but if I switch desktops, it's moved up again.

This doesn't appear to happen if the bottom of the browser window is higher and doesn't touch the top of the shelf.

I'm not sure whether it's high-DPI-related.
 
wrong.png
144 KB View Download
right.png
146 KB View Download

Comment 1 by derat@chromium.org, Jun 30 2016

Components: UI>Shell>WindowManager
Owner: warx@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by warx@chromium.org, Jul 9 2016

Hi, I have several questions here:

First, I am using link device and on M54 trunk now.

1. Sign in as two users.
is this two chrome browser users or two chromeos login users?
2. Make sure that "Autohide shelf" is unchecked.
3. Resize a browser window so its bottom touches the top of the shelf.
4. Start loading a page.
5. Switch to the other user and then back.
how do you do the switch? it depends on 1, if two browser users, switch on browser, if two chromeos users, signout and signin to another user and then signin back?

Since I cannot reproduce, I pretty want a more detailed steps, thanks!

Comment 4 by derat@chromium.org, Jul 9 2016

> is this two chrome browser users or two chromeos login users?

Two Chrome OS users (i.e. two desktops).

> how do you do the switch?

Ctrl-, and Ctrl-.

I just verified this on a low-DPI peppy running 51.0.2704.103, so it's not high-DPI-specific. It doesn't work if the window is maximized. The bottom of my browser window on my google.com desktop is aligned with the top of the shelf. I opened a new tab, started loading a page, and then hit Ctrl-, (to switch to my gmail.com desktop) and Ctrl-. (to switch back to google.com). The status bubble is a few pixels higher than it should be.

Comment 5 by warx@chromium.org, Jul 12 2016

Two Chrome OS users (i.e. two desktops). --I assume by clicking system tray and clicking avatar and click "Sign in another user..."

Ctrl- seems zoom out for me, why it could be the switch?

Comment 6 by derat@chromium.org, Jul 12 2016

> Two Chrome OS users (i.e. two desktops).
> --I assume by clicking system tray and clicking avatar
> and click "Sign in another user..."

Yes, that's correct.

> Ctrl- seems zoom out for me, why it could be the switch?

Sorry, that should've been was Ctrl+Alt+Comma and Ctrl+Alt+Period, i.e. the accelerators for switching desktops.

Comment 7 by warx@chromium.org, Jul 12 2016

Thanks, it really helps.

Comment 8 by warx@chromium.org, Jul 22 2016

More related cases here:
(1) system tray -> click avatar -> Sign in another user, and when the signin screen appears, press 'ESC' to cancel, the reporter's bug also happens.

(2) The primary signin user has the attached state, with shelf left alignment and browser window touch the screen bottom. The second signin user has shelf bottom alignment. Then reproduce by Ctrl+Alt+Period.

The reason is user shelf transition is an animation and it may change the work area.
Screenshot 2016-07-22 at 9.29.47 AM.png
621 KB View Download
Screenshot 2016-07-22 at 9.29.55 AM.png
621 KB View Download
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 26 2016

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

commit e17639909d925fcde4f0c3425c261d166036aa5d
Author: warx <warx@chromium.org>
Date: Fri Aug 26 19:41:18 2016

AdjustBoundsToEnsureMinimumWindowVisibility may cause unwanted shift if window dimension is small

Status bubble height may be smaller than kMinimumOnScreenArea, which is 25. The current logic in AdjustBoundsToEnsureWindowVisibility fails in this case.

For example, bounds->y() > visible_area.bottom() - min_height is satisfied when status bubble (height 22) touches the bottom of work area. If we adjust bounds using bounds->set_y(visible_area.bottom() - min_height), it will cause unwanted white space.

BUG= 624806 
TEST=Device test, fixing the reporter's bug. The bug in comment 8 is a different bug and will be dealt with later by filing another bug with it.
add unittest coverage

Review-Url: https://codereview.chromium.org/2175833002
Cr-Commit-Position: refs/heads/master@{#414782}

[modify] https://crrev.com/e17639909d925fcde4f0c3425c261d166036aa5d/ash/common/wm/window_positioning_utils.cc
[modify] https://crrev.com/e17639909d925fcde4f0c3425c261d166036aa5d/ash/wm/window_util_unittest.cc

Comment 10 by warx@chromium.org, Aug 31 2016

Blockedon: 642809
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 6 2017

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

commit 7c2d8440c9c23b793c29aeef48dc18d4059d7681
Author: warx <warx@chromium.org>
Date: Fri Jan 06 02:13:38 2017

Fix status bubble is vertically offset after switching desktops

Changes:
Do not AdjustBoundsToEnsureMinimumWindowVisibility if window is transient

BUG= 624806 
TEST=emulator test, also add test coverage

Review-Url: https://codereview.chromium.org/2593953002
Cr-Commit-Position: refs/heads/master@{#441822}

[modify] https://crrev.com/7c2d8440c9c23b793c29aeef48dc18d4059d7681/ash/common/wm/default_state.cc
[modify] https://crrev.com/7c2d8440c9c23b793c29aeef48dc18d4059d7681/ash/common/wm/workspace/workspace_layout_manager_unittest.cc

Comment 12 by warx@chromium.org, Jan 6 2017

Status: Fixed (was: Assigned)

Comment 13 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 14 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59
Status: Verified (was: Fixed)
9557.0.0, 60.0.3101.0

Sign in to add a comment