From 3439a3a8423913a2b33c564bed87a2812ab16e6f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 2 Apr 2017 20:20:51 +0200 Subject: Fix missing win32 initial size when embedded in prent window. --- plugingui/nativewindow_win32.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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); + } } -- cgit v1.2.3