Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc

Issue 12319091: x11 desktop aura: Fix the cached bounds of the X window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc
index 6f7b8954258e9915369879a700693a3ace52a4b2..78290cccea0e0f86f10a89ef7ee3924d095174b5 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc
@@ -930,7 +930,14 @@ bool DesktopRootWindowHostLinux::Dispatch(const base::NativeEvent& 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,
+ int translated_x = xev->xconfigure.x;
+ int translated_y = xev->xconfigure.y;
+ if (!xev->xconfigure.send_event && !xev->xconfigure.override_redirect) {
+ Window unused;
+ XTranslateCoordinates(xdisplay_, xwindow_, x_root_window_,
+ 0, 0, &translated_x, &translated_y, &unused);
+ }
+ gfx::Rect bounds(translated_x, translated_y,
xev->xconfigure.width, xev->xconfigure.height);
bool size_changed = bounds_.size() != bounds.size();
bool origin_changed = bounds_.origin() != bounds.origin();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698