summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/nativewindow_win32.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc
index 3893c3d..5ee912b 100644
--- a/plugingui/nativewindow_win32.cc
+++ b/plugingui/nativewindow_win32.cc
@@ -373,6 +373,12 @@ NativeWindowWin32::NativeWindowWin32(void* native_window, Window& window)
{
// Listen in on parent size changes.
SetWindowSubclass(parent_window, subClassProc, 42, (LONG_PTR)this);
+
+ // Resize newly created window to fit into parent.
+ RECT rect;
+ GetClientRect(parent_window, &rect);
+ resize(rect.right - rect.left, rect.bottom - rect.top);
+
}
}