NativeWidgetMus::SetBounds() should support moving widgets between displays |
|||||||
Issue descriptionThere 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.
,
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
,
Oct 4 2016
,
Oct 4 2016
,
Oct 19 2016
,
Feb 2 2017
NativeWidgetMus is no more.
,
Feb 26 2018
,
Feb 26 2018
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by jamescook@chromium.org
, Sep 8 2016