Support EmbeddedWindow in wf_resize_window
@@ -351,6 +351,12 @@ void wf_resize_window(wfContext* wfc)
else if (!wfc->context.settings->Decorations)
{
SetWindowLongPtr(wfc->hwnd, GWL_STYLE, WS_CHILD);
+ if (settings->EmbeddedWindow)
+ {
+ wf_update_canvas_diff(wfc);
+ }
+ else
+ {
/* Now resize to get full canvas size and room for caption and borders */
SetWindowPos(wfc->hwnd, HWND_TOP, 0, 0, settings->DesktopWidth,
settings->DesktopHeight, SWP_FRAMECHANGED);
@@ -358,6 +364,7 @@ void wf_resize_window(wfContext* wfc)
SetWindowPos(wfc->hwnd, HWND_TOP, -1, -1, settings->DesktopWidth + wfc->diff.x,
settings->DesktopHeight + wfc->diff.y, SWP_NOMOVE | SWP_FRAMECHANGED);
}
+ }
else
{
SetWindowLongPtr(wfc->hwnd, GWL_STYLE,
