diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-02 20:20:51 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-02 20:20:51 +0200 |
commit | 3439a3a8423913a2b33c564bed87a2812ab16e6f (patch) | |
tree | 4097ec736daf88e98893a09a3844666eccbe8c6f | |
parent | d40e6aa24e001986f4990797b0d4e8a0c85c92bc (diff) |
Fix missing win32 initial size when embedded in prent window.
-rw-r--r-- | plugingui/nativewindow_win32.cc | 6 |
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); + } } |