New issue
Advanced search Search tips

Issue 847982 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 841020



Sign in to add a comment

Open shortcut viewer app centered on correct display

Project Member Reported by jamescook@chromium.org, May 30 2018

Issue description

Right now it always opens at the top-left corner of the primary display.

Ideally it would just supply a size to the window manager and ash would determine the correct display and center it.

I'll take a look - wutao or msw, ping me if you're already looking at this.

 

Comment 1 by wutao@chromium.org, May 30 2018

It should be fixed in  issue 831323 .

Comment 2 by wutao@chromium.org, May 30 2018

In #1 We are using ash::Shell::GetRootWindowForNewWindows to open it in the correct display. But we has this  issue 833673  to remove the Shell deps.
Sorry, I mean when running the app version with --keyboard-shortcut-viewer-app
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 1 2018

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

commit 43e5034df2e87fe2dd959aa2c23e795246711d3a
Author: James Cook <jamescook@chromium.org>
Date: Fri Jun 01 20:51:17 2018

chromeos: Make shortcut_viewer app appear on correct display

The mojo app version of shortcut_viewer can't use an aura::Window to
provide context to choose a display. Instead, provide neither context
nor a parent, which makes ash place the window on the display for new
windows. Don't provide bounds (since that would force the window to
a particular display). Instead, provide a preferred size.

This requires fixes to native widget initialization to make sure
the default aura::Window context (which is RootWindowForNewWindows)
provides the correct default display when there is no parent.

The test for this live in ash_unittests because I didn't want to add
an ash/shell.h dependency to keyboard_shortcut_viewer.

TBR=sky@chromium.org

Bug:  847982 ,  833673 ,  841020 
Test: added
Change-Id: Id3179d1c4d9b39911aded19fe171491f479fe4db
Reviewed-on: https://chromium-review.googlesource.com/1081174
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563786}
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/shortcut_viewer_application.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/shell_unittest.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/container_finder.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/container_finder.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/non_client_frame_controller.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/root_window_finder.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/root_window_finder.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/top_level_window_factory.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/chrome/browser/ui/ash/ksv/DEPS
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_util.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ui/aura/mus/window_tree_host_mus_init_params.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ui/views/widget/native_widget_aura.cc

Status: Fixed (was: Started)

Sign in to add a comment