Chromium Code Reviews| Index: ui/aura/root_window_host_linux.cc |
| diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc |
| index dc76e68c15a77451dc054e586324de7276e846db..76ab16c9df163ef26c502e09bdbea3de71c935aa 100644 |
| --- a/ui/aura/root_window_host_linux.cc |
| +++ b/ui/aura/root_window_host_linux.cc |
| @@ -40,6 +40,8 @@ |
| #include "base/chromeos/chromeos_version.h" |
| #endif |
| +#include "base/debug/stack_trace.h" |
|
oshima
2012/09/18 15:32:09
i'll remove this.
|
| + |
| using std::max; |
| using std::min; |
| @@ -748,12 +750,22 @@ void RootWindowHostLinux::SetBounds(const gfx::Rect& bounds) { |
| delegate_->AsRootWindow()).device_scale_factor(); |
| bool size_changed = bounds_.size() != bounds.size() || |
| current_scale != new_scale; |
| + XWindowChanges changes = {0}; |
| + unsigned value_mask = 0; |
| - if (bounds.size() != bounds_.size()) |
| - XResizeWindow(xdisplay_, xwindow_, bounds.width(), bounds.height()); |
| + if (bounds.size() != bounds_.size()) { |
| + changes.width = bounds.width(); |
| + changes.height = bounds.height(); |
| + value_mask = CWHeight | CWWidth; |
| + } |
| - if (bounds.origin() != bounds_.origin()) |
| - XMoveWindow(xdisplay_, xwindow_, bounds.x(), bounds.y()); |
| + if (bounds.origin() != bounds_.origin()) { |
| + changes.x = bounds.x(); |
| + changes.y = bounds.y(); |
| + value_mask |= CWX | CWY; |
| + } |
| + if (value_mask) |
| + XConfigureWindow(xdisplay_, xwindow_, value_mask, &changes); |
|
oshima
2012/09/18 15:32:09
This fixed two configure event issue.
|
| // Assume that the resize will go through as requested, which should be the |
| // case if we're running without a window manager. If there's a window |