commit 06d588110317b544619871d50d02eb3cac32aff7
parent 8bccf9fcd6aef06e61b0462d8df1e23c07e743cf
Author: falkTX <falktx@gmail.com>
Date: Fri, 13 Feb 2015 01:04:37 +0000
Fix win32 embed size
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -493,7 +493,7 @@ struct Window::PrivateData {
#if defined(DISTRHO_OS_WINDOWS)
const int winFlags = WS_POPUPWINDOW | WS_CAPTION | (fResizable ? WS_SIZEBOX : 0x0);
RECT wr = { 0, 0, static_cast<long>(width), static_cast<long>(height) };
- AdjustWindowRectEx(&wr, winFlags, FALSE, WS_EX_TOPMOST);
+ AdjustWindowRectEx(&wr, fUsingEmbed ? WS_CHILD : winFlags, FALSE, WS_EX_TOPMOST);
SetWindowPos(hwnd, 0, 0, 0, wr.right-wr.left, wr.bottom-wr.top,
SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOOWNERZORDER|SWP_NOZORDER);
diff --git a/dgl/src/pugl/pugl_win.cpp b/dgl/src/pugl/pugl_win.cpp
@@ -107,7 +107,7 @@ puglCreateWindow(PuglView* view, const char* title)
// Adjust the overall window size to accomodate our requested client size
const int winFlags = WS_POPUPWINDOW | WS_CAPTION | (view->resizable ? WS_SIZEBOX : 0x0);
RECT wr = { 0, 0, view->width, view->height };
- AdjustWindowRectEx(&wr, winFlags, FALSE, WS_EX_TOPMOST);
+ AdjustWindowRectEx(&wr, view->parent ? WS_CHILD : winFlags, FALSE, WS_EX_TOPMOST);
impl->hwnd = CreateWindowEx(
WS_EX_TOPMOST,