diff options
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/plugin/win/main_win.cc | 5 |
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); |