| Index: win8/metro_driver/chrome_app_view.cc
|
| ===================================================================
|
| --- win8/metro_driver/chrome_app_view.cc (revision 157261)
|
| +++ win8/metro_driver/chrome_app_view.cc (working copy)
|
| @@ -218,15 +218,16 @@
|
| ::ShowWindow(current_top_frame, SW_HIDE);
|
| }
|
|
|
| - // If chrome opens a url in a foreground tab, it may call SetFrameWindow
|
| - // again. Ensure that we don't have dups.
|
| - globals.host_windows.remove_if([hwnd](std::pair<HWND, bool>& item) {
|
| + std::list<std::pair<HWND, bool> >::iterator index =
|
| + std::find_if(globals.host_windows.begin(), globals.host_windows.end(),
|
| + [hwnd](std::pair<HWND, bool>& item) {
|
| return (item.first == hwnd);
|
| });
|
|
|
| - globals.host_windows.push_front(std::make_pair(hwnd, false));
|
| -
|
| - AdjustFrameWindowStyleForMetro(hwnd);
|
| + if (index == globals.host_windows.end()) {
|
| + globals.host_windows.push_front(std::make_pair(hwnd, false));
|
| + AdjustFrameWindowStyleForMetro(hwnd);
|
| + }
|
| }
|
|
|
| void CloseFrameWindowInternal(HWND hwnd) {
|
|
|