diff options
author | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 21:08:27 +0000 |
---|---|---|
committer | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 21:08:27 +0000 |
commit | 4aa0d84f4864b284ab93b2c5af9d9d96e5d3a4ac (patch) | |
tree | b374508e859ee348527ac75b111d161a96a5af4e /ash/root_window_controller.h | |
parent | cc384b25fb73e9e3b5c44b9e9051c90229697ca5 (diff) | |
download | chromium_src-4aa0d84f4864b284ab93b2c5af9d9d96e5d3a4ac.zip chromium_src-4aa0d84f4864b284ab93b2c5af9d9d96e5d3a4ac.tar.gz chromium_src-4aa0d84f4864b284ab93b2c5af9d9d96e5d3a4ac.tar.bz2 |
Swap touch HUD when switching primary display
When a display is set as the primary display, its root window (and all
its children, including the widget showing the touch HUD) is replaced
with the old one's. But, the touch HUD widget is bound to display and
should not be swapped between the two displays. So, after swapping the
root windows, touch HUDs are swapped back to their own display.
BUG=172237
Review URL: https://chromiumcodereview.appspot.com/13460017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196235 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.h')
-rw-r--r-- | ash/root_window_controller.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h index 1bd6ae8..45c2807 100644 --- a/ash/root_window_controller.h +++ b/ash/root_window_controller.h @@ -89,13 +89,13 @@ class ASH_EXPORT RootWindowController { // NULL if no such shelf exists. ShelfWidget* shelf() { return shelf_.get(); } - TouchObserverHUD* touch_observer_hud() { return touch_observer_hud_.get(); } - - // Sets the touch HUD for this root window controller and adds it as a - // pre-target handler to the root window. Also, removes the previous touch - // HUD, if any, from pre-target handlers. - void SetTouchObserverHUD(TouchObserverHUD* hud); + TouchObserverHUD* touch_observer_hud() { return touch_observer_hud_; } + // Sets the touch HUD. The RootWindowController will not own this HUD; its + // lifetime is managed by itself. + void set_touch_observer_hud(TouchObserverHUD* hud) { + touch_observer_hud_ = hud; + } // Access the shelf layout manager associated with this root // window controller, NULL if no such shelf exists. ShelfLayoutManager* GetShelfLayoutManager(); @@ -200,8 +200,9 @@ class ASH_EXPORT RootWindowController { scoped_ptr<ScreenDimmer> screen_dimmer_; scoped_ptr<WorkspaceController> workspace_controller_; - // Heads-up display for touch events. - scoped_ptr<TouchObserverHUD> touch_observer_hud_; + // Heads-up display for touch events. The RootWindowController does not own + // this HUD; its lifetime is managed by itself. + TouchObserverHUD* touch_observer_hud_; // We need to own event handlers for various containers. scoped_ptr<ToplevelWindowEventHandler> default_container_handler_; |