summaryrefslogtreecommitdiffstats
path: root/ash/screen_ash.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 04:07:24 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 04:07:24 +0000
commit36f5665394b23c0f2a4b678838f5b93a11b9e17d (patch)
tree357de618b23bafb153f75cd03fda9bbfb27681d0 /ash/screen_ash.h
parent9dd1d5809c8420f1e636154424826bf575804cdc (diff)
downloadchromium_src-36f5665394b23c0f2a4b678838f5b93a11b9e17d.zip
chromium_src-36f5665394b23c0f2a4b678838f5b93a11b9e17d.tar.gz
chromium_src-36f5665394b23c0f2a4b678838f5b93a11b9e17d.tar.bz2
Add switch primary display option by swapping primary root window between displays.
This has following sub-changes - DisplayController now manages which display is primary display, instead of relying on the order in DisplayManager - MultiDisplayManager uses display ID instead of order to check if a display has added/removed or its bounds has change. (which is fixes the TODO) - Primary display always has 0,0 origin. This also fixed a few issues that i discovered while working on this. - RootWindowHostLinux::SetBounds causes 2 ConfigureNotify, which causes unnecessary move/resize event. - mouse_cursor_event_filter and display_controller were using default_display_layout, which is wrong. It should use the layout for currently used secondary display. BUG=146886 TEST=covered by test. On device, press alt-f4 to switch primary display. Review URL: https://codereview.chromium.org/10905288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/screen_ash.h')
-rw-r--r--ash/screen_ash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/screen_ash.h b/ash/screen_ash.h
index cf2f221..8d83685 100644
--- a/ash/screen_ash.h
+++ b/ash/screen_ash.h
@@ -51,6 +51,10 @@ class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl {
static gfx::Rect ConvertRectFromScreen(aura::Window* window,
const gfx::Rect& rect);
+ // Returns a gfx::Display object for secondary display. Returns
+ // ivalid display if there is no secondary display connected.
+ static const gfx::Display& GetSecondaryDisplay();
+
protected:
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;