summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-02 20:20:51 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-02 20:20:51 +0200
commit3439a3a8423913a2b33c564bed87a2812ab16e6f (patch)
tree4097ec736daf88e98893a09a3844666eccbe8c6f /plugingui
parentd40e6aa24e001986f4990797b0d4e8a0c85c92bc (diff)
Fix missing win32 initial size when embedded in prent window.
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);
+
}
}