summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgangji@google.com <gangji@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:23:00 +0000
committergangji@google.com <gangji@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:23:00 +0000
commitd509ba755674f0b9dd1037ea25404378fab38e87 (patch)
tree26e906e9dd9c3a7af9faa8b70a28bbe530d4e63b /o3d
parent90b0d79b1120b4b6e66d2da2049156c35bf53125 (diff)
downloadchromium_src-d509ba755674f0b9dd1037ea25404378fab38e87.zip
chromium_src-d509ba755674f0b9dd1037ea25404378fab38e87.tar.gz
chromium_src-d509ba755674f0b9dd1037ea25404378fab38e87.tar.bz2
Fixing a random hang when exiting full screen in chome. The same bug doesn't
happen in firefox or internet explorer. In chrome, the parent windows handle might get locked and the ShowWindow call is blocked and hang. The fix is not to hind the window for repositioning. Review URL: http://codereview.chromium.org/6732033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/win/main_win.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 96be8d1..efea1a5 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -669,7 +669,13 @@ void CleanupAllWindows(PluginObject *obj) {
void ReplaceContentWindow(HWND content_hwnd,
HWND containing_hwnd,
int width, int height) {
- ::ShowWindow(content_hwnd, SW_HIDE);
+ // In Chrome browser, IPC might block this call. This doesn't happen with
+ // firefox or internet explorer. For Chome, do not hide the window. Haven't
+ // any artifacts with this change when exiting from full screen.
+ PluginObject *obj = PluginObject::GetPluginProperty(content_hwnd);
+ if (obj && !obj->IsChrome()) {
+ ::ShowWindow(content_hwnd, SW_HIDE);
+ }
LONG_PTR style = ::GetWindowLongPtr(content_hwnd, GWL_STYLE);
style |= WS_CHILD;
::SetWindowLongPtr(content_hwnd, GWL_STYLE, style);