diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 00:12:28 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 00:12:28 +0000 |
commit | d1f355bba03332716cf667efaa5e374402404642 (patch) | |
tree | 088f08f81e7edf54fd065256838eb6c81501a8b8 /ui/aura/root_window_host_linux.cc | |
parent | db897a0054079a125d89a554c1572fc67ab3321a (diff) | |
download | chromium_src-d1f355bba03332716cf667efaa5e374402404642.zip chromium_src-d1f355bba03332716cf667efaa5e374402404642.tar.gz chromium_src-d1f355bba03332716cf667efaa5e374402404642.tar.bz2 |
Confine cursor after bounds is updated.
BUG=126342
TEST=tested manually on the device
Review URL: https://chromiumcodereview.appspot.com/10383051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window_host_linux.cc')
-rw-r--r-- | ui/aura/root_window_host_linux.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc index d0e9780..d9b9cd3 100644 --- a/ui/aura/root_window_host_linux.cc +++ b/ui/aura/root_window_host_linux.cc @@ -489,6 +489,13 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) { case ConfigureNotify: { DCHECK_EQ(xwindow_, xev->xconfigure.window); DCHECK_EQ(xwindow_, xev->xconfigure.event); + // It's possible that the X window may be resized by some other means than + // from within aura (e.g. the X window manager can change the size). Make + // sure the root window size is maintained properly. + gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, + xev->xconfigure.width, xev->xconfigure.height); + bool size_changed = bounds_.size() != bounds.size(); + bounds_ = bounds; // Update barrier and mouse location when the root window has // moved/resized. if (pointer_barriers_.get()) { @@ -497,13 +504,6 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) { XWarpPointer(xdisplay_, None, xwindow_, 0, 0, 0, 0, p.x(), p.y()); ConfineCursorToRootWindow(); } - // It's possible that the X window may be resized by some other means than - // from within aura (e.g. the X window manager can change the size). Make - // sure the root window size is maintained properly. - gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, - xev->xconfigure.width, xev->xconfigure.height); - bool size_changed = bounds_.size() != bounds.size(); - bounds_ = bounds; if (size_changed) root_window_->OnHostResized(bounds.size()); break; |