summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 22:12:17 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 22:12:17 +0000
commit0f02d1b825d8e5af629be0b294cd89560e073112 (patch)
tree109f4d2bb5bb42c8d7c1d76c89bf733f16b13004 /o3d
parentf1b8f89eff06bfb8284b177e0dd5c7fdf0e027b5 (diff)
downloadchromium_src-0f02d1b825d8e5af629be0b294cd89560e073112.zip
chromium_src-0f02d1b825d8e5af629be0b294cd89560e073112.tar.gz
chromium_src-0f02d1b825d8e5af629be0b294cd89560e073112.tar.bz2
This fixes (again) the rendering problem we have with zero-height
window resizes from Firefox. It puts back the explicit window resize, but doesn't do it if the window is zero width or height. This seems to fix the problem without causing resize problems in the beach demo. TESTED=ran beach demo, 2d, and render-mode examples, in separate tabs and checked to make sure that background tabs didn't draw over foreground tabs (all in Firefox). Review URL: http://codereview.chromium.org/267041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/win/main_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 7d6ec75..f658f84 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -836,6 +836,11 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) {
// Avoid spurious resize requests.
if (window->width != obj->width() ||
window->height != obj->height()) {
+ if (!obj->fullscreen() && window->width > 0 && window->height > 0) {
+ ::SetWindowPos(obj->GetContentHWnd(), obj->GetPluginHWnd(), 0, 0,
+ window->width, window->height,
+ SWP_NOZORDER | SWP_NOREPOSITION);
+ }
// Even if we are in full-screen mode, store off the new width
// and height to restore to them later.
obj->Resize(window->width, window->height);