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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2154483002: X11: Cancel delayed resize task on manual resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 991
992 void DesktopWindowTreeHostX11::SetBounds( 992 void DesktopWindowTreeHostX11::SetBounds(
993 const gfx::Rect& requested_bounds_in_pixel) { 993 const gfx::Rect& requested_bounds_in_pixel) {
994 gfx::Rect bounds_in_pixels(requested_bounds_in_pixel.origin(), 994 gfx::Rect bounds_in_pixels(requested_bounds_in_pixel.origin(),
995 AdjustSize(requested_bounds_in_pixel.size())); 995 AdjustSize(requested_bounds_in_pixel.size()));
996 bool origin_changed = bounds_in_pixels_.origin() != bounds_in_pixels.origin(); 996 bool origin_changed = bounds_in_pixels_.origin() != bounds_in_pixels.origin();
997 bool size_changed = bounds_in_pixels_.size() != bounds_in_pixels.size(); 997 bool size_changed = bounds_in_pixels_.size() != bounds_in_pixels.size();
998 XWindowChanges changes = {0}; 998 XWindowChanges changes = {0};
999 unsigned value_mask = 0; 999 unsigned value_mask = 0;
1000 1000
1001 delayed_resize_task_.Cancel();
1002
1001 if (size_changed) { 1003 if (size_changed) {
1002 // Update the minimum and maximum sizes in case they have changed. 1004 // Update the minimum and maximum sizes in case they have changed.
1003 UpdateMinAndMaxSize(); 1005 UpdateMinAndMaxSize();
1004 1006
1005 if (bounds_in_pixels.width() < min_size_in_pixels_.width() || 1007 if (bounds_in_pixels.width() < min_size_in_pixels_.width() ||
1006 bounds_in_pixels.height() < min_size_in_pixels_.height() || 1008 bounds_in_pixels.height() < min_size_in_pixels_.height() ||
1007 (!max_size_in_pixels_.IsEmpty() && 1009 (!max_size_in_pixels_.IsEmpty() &&
1008 (bounds_in_pixels.width() > max_size_in_pixels_.width() || 1010 (bounds_in_pixels.width() > max_size_in_pixels_.width() ||
1009 bounds_in_pixels.height() > max_size_in_pixels_.height()))) { 1011 bounds_in_pixels.height() > max_size_in_pixels_.height()))) {
1010 gfx::Size size_in_pixels = bounds_in_pixels.size(); 1012 gfx::Size size_in_pixels = bounds_in_pixels.size();
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 if (linux_ui) { 2072 if (linux_ui) {
2071 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2073 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2072 if (native_theme) 2074 if (native_theme)
2073 return native_theme; 2075 return native_theme;
2074 } 2076 }
2075 2077
2076 return ui::NativeThemeAura::instance(); 2078 return ui::NativeThemeAura::instance();
2077 } 2079 }
2078 2080
2079 } // namespace views 2081 } // namespace views
OLDNEW
« 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