From 0f02d1b825d8e5af629be0b294cd89560e073112 Mon Sep 17 00:00:00 2001 From: "gspencer@google.com" Date: Fri, 9 Oct 2009 22:12:17 +0000 Subject: 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 --- o3d/plugin/win/main_win.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'o3d') 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); -- cgit v1.1