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

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

Issue 542533002: [Aura] Fix window resize handling on fullscreen event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cancel resize event on fullscreen event Created 6 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/views/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | 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_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();
}
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698