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

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

Issue 1898953003: Record that the window is mapped when we receive a MapNotify event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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 2b0f75652ed29a0efafe6783f47230401f2bbfc8..32092cffdf11e018a8929855812b8fe0e7204b82 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
@@ -1660,16 +1660,6 @@ void DesktopWindowTreeHostX11::MapWindow(ui::WindowShowState show_state) {
// asynchronous.
if (ui::X11EventSource::GetInstance())
ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(xwindow_);
- window_mapped_ = true;
-
- UpdateMinAndMaxSize();
-
- // Some WMs only respect maximize hints after the window has been mapped.
- // Check whether we need to re-do a maximization.
- if (should_maximize_after_map_) {
- Maximize();
- should_maximize_after_map_ = false;
- }
}
void DesktopWindowTreeHostX11::SetWindowTransparency() {
@@ -1883,9 +1873,21 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
break;
}
case MapNotify: {
+ window_mapped_ = true;
+
FOR_EACH_OBSERVER(DesktopWindowTreeHostObserverX11,
observer_list_,
OnWindowMapped(xwindow_));
+
+ UpdateMinAndMaxSize();
+
+ // Some WMs only respect maximize hints after the window has been mapped.
+ // Check whether we need to re-do a maximization.
+ if (should_maximize_after_map_) {
+ Maximize();
+ should_maximize_after_map_ = false;
+ }
+
break;
}
case UnmapNotify: {
« 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