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

Unified Diff: ui/aura/root_window_host_linux.cc

Issue 10905288: Switch primary display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 3 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 | « ui/aura/display_manager.h ('k') | ui/aura/single_display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c8e61e08408e5543078946ca933d37dc01b55bd8 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -748,12 +748,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);
// 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
« no previous file with comments | « ui/aura/display_manager.h ('k') | ui/aura/single_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698