Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
index 1fd497f8b0197acafe82684fec3ffbc2739a1352..f49783344becec03109567405bce4bf55d03f6d6 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
@@ -705,6 +705,8 @@ void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { |
if (is_fullscreen_ == fullscreen) |
return; |
is_fullscreen_ = fullscreen; |
+ if (is_fullscreen_) |
+ delayed_resize_task_.Cancel(); |
// Work around a bug where if we try to unfullscreen, metacity immediately |
// fullscreens us again. This is a little flickery and not necessary if |
@@ -1718,10 +1720,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( |
OnHostMoved(bounds_.origin()); |
if (size_changed) { |
+ window_size_ = bounds.size(); |
delayed_resize_task_.Reset(base::Bind( |
&DesktopWindowTreeHostX11::DelayedResize, |
- close_widget_factory_.GetWeakPtr(), |
- bounds.size())); |
+ close_widget_factory_.GetWeakPtr())); |
Elliot Glaysher
2014/09/04 17:19:19
I suspect that you should be writing this a differ
tzik
2014/09/05 04:12:23
Hm, right. I misunderstood something..
The previou
|
base::MessageLoop::current()->PostTask( |
FROM_HERE, delayed_resize_task_.callback()); |
} |
@@ -1891,8 +1893,8 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( |
return ui::POST_DISPATCH_STOP_PROPAGATION; |
} |
-void DesktopWindowTreeHostX11::DelayedResize(const gfx::Size& size) { |
- OnHostResized(size); |
+void DesktopWindowTreeHostX11::DelayedResize() { |
+ OnHostResized(window_size_); |
ResetWindowRegion(); |
delayed_resize_task_.Cancel(); |
} |