summaryrefslogtreecommitdiffstats
path: root/win8/metro_driver
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-29 00:51:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-29 00:51:27 +0000
commit59b9a62ca6922e9c2b7b1e004a790326a56fc906 (patch)
tree3452625f074bd132242f89217515b23967896237 /win8/metro_driver
parent621de9f4d0bb9b761c0a8d0da9ffb6a37ef1b0e7 (diff)
downloadchromium_src-59b9a62ca6922e9c2b7b1e004a790326a56fc906.zip
chromium_src-59b9a62ca6922e9c2b7b1e004a790326a56fc906.tar.gz
chromium_src-59b9a62ca6922e9c2b7b1e004a790326a56fc906.tar.bz2
In Chrome metro mode we need to ensure that windows currently visible in metro mode are at the top of the
window list maintained by the metro driver. This regressed with my change to fix the OSK scrolling bug: http://code.google.com/p/chromium/issues/detail?id=150848 BUG=150848 R=cpu Review URL: https://codereview.chromium.org/11014005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8/metro_driver')
-rw-r--r--win8/metro_driver/chrome_app_view.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/win8/metro_driver/chrome_app_view.cc b/win8/metro_driver/chrome_app_view.cc
index f926f28..abac4b5 100644
--- a/win8/metro_driver/chrome_app_view.cc
+++ b/win8/metro_driver/chrome_app_view.cc
@@ -218,16 +218,28 @@ void SetFrameWindowInternal(HWND hwnd) {
::ShowWindow(current_top_frame, SW_HIDE);
}
+ // Visible frame windows always need to be at the head of the list.
+ // Check if the window being shown already exists in our global list.
+ // If no then add it at the head of the list.
+ // If yes, retrieve the osk window scrolled state, remove the window from the
+ // list and readd it at the head.
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);
});
- if (index == globals.host_windows.end()) {
- globals.host_windows.push_front(std::make_pair(hwnd, false));
- AdjustFrameWindowStyleForMetro(hwnd);
+ bool window_scrolled_state = false;
+ bool new_window = (index == globals.host_windows.end());
+ if (!new_window) {
+ window_scrolled_state = index->second;
+ globals.host_windows.erase(index);
}
+
+ globals.host_windows.push_front(std::make_pair(hwnd, window_scrolled_state));
+
+ if (new_window)
+ AdjustFrameWindowStyleForMetro(hwnd);
}
void CloseFrameWindowInternal(HWND hwnd) {