New issue
Advanced search Search tips

Issue 645291 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

NativeWidgetMus::SetBounds() should support moving widgets between displays

Project Member Reported by jamescook@chromium.org, Sep 8 2016

Issue description

There are many pieces to dragging widgets between displays; this is just one.

On classic ash, NativeWidgetAura::SetBounds() uses aura::client::ScreenPositionClient::SetBounds() which delegates back into ash to support migrating windows between displays.

aura::Window::SetBoundsInScreen() uses the same ScreenPositionClient, so you get the same behavior whether you set bounds on a widget or on the window (either directly or via WmWindowAura).

Under mus, we have a ScreenPositionClient per ui::Window, but that's just for handling aura children of the mus ui::Window. It's not used to position widgets.

Right now NativeWidgetMus::SetBounds() and WmWindowMus::SetBoundsInScreen() don't share code. This caused  issue 644895 , the shelf being positioned incorrectly on the second display.

We probably need some kind of delegate out of ui/views/mus back to whatever part of the system knows about both views::Widget and display management. In particular, it needs to be able to handle moving widgets between displays. I'm not sure if that will live in //ash or //ui or elsewhere.

 
Related to  issue 615552  WmWindowMus needs to support SetBoundsInScreen and associated BoundsInScreenBehavior
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 9 2016

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

commit fa697bc0a0332fc8ab5684f4c4366797d4b5aeab
Author: jamescook <jamescook@chromium.org>
Date: Fri Sep 09 04:43:55 2016

mash: Fix shelf on second display appearing in wrong position

NativeWidgetMus::SetBounds() was not correcting for the display origin.

Also fix NativeWidgetMus::GetBoundsInScreen(), which had the same problem.

BUG= 645291 , 644895 
TEST=run mash with --multi-display, shelf appears on second display

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

[modify] https://crrev.com/fa697bc0a0332fc8ab5684f4c4366797d4b5aeab/ui/views/mus/native_widget_mus.cc
[modify] https://crrev.com/fa697bc0a0332fc8ab5684f4c4366797d4b5aeab/ui/views/mus/native_widget_mus.h

Labels: Proj-Mustash
Components: Internals>MUS
Labels: mustash-display
Status: WontFix (was: Untriaged)
NativeWidgetMus is no more.
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS

Sign in to add a comment