diff options
Diffstat (limited to 'chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc')
-rw-r--r-- | chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc index 69c5b2f44a8..ceffac09ddb 100644 --- a/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ b/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc @@ -237,7 +237,17 @@ void DesktopWindowTreeHostX11::SwapNonClientEventHandler( x11_non_client_event_filter_ = handler.Pass(); } -void DesktopWindowTreeHostX11::CleanUpWindowList() { +void DesktopWindowTreeHostX11::CleanUpWindowList( + void (*func)(aura::Window* window)) { + if (!open_windows_) + return; + while (!open_windows_->empty()) { + XID xid = open_windows_->front(); + func(GetContentWindowForXID(xid)); + if (!open_windows_->empty() && open_windows_->front() == xid) + open_windows_->erase(open_windows_->begin()); + } + delete open_windows_; open_windows_ = NULL; } |