Support EmbeddedWindow in wf_resize_window
authorEric Brown <eric@securelink.com>
Fri, 2 Mar 2018 18:39:59 +0000 (12:39 -0600)
committerEric Brown <eric@securelink.com>
Fri, 2 Mar 2018 18:39:59 +0000 (12:39 -0600)
client/Windows/wf_gdi.c

index 160da54..d08430d 100644 (file)
@@ -351,12 +351,19 @@ void wf_resize_window(wfContext* wfc)
        else if (!wfc->context.settings->Decorations)
        {
                SetWindowLongPtr(wfc->hwnd, GWL_STYLE, WS_CHILD);
-               /* 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);
-               wf_update_canvas_diff(wfc);
-               SetWindowPos(wfc->hwnd, HWND_TOP, -1, -1, settings->DesktopWidth + wfc->diff.x,
-                            settings->DesktopHeight + wfc->diff.y, SWP_NOMOVE | SWP_FRAMECHANGED);
+               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);
+                       wf_update_canvas_diff(wfc);
+                       SetWindowPos(wfc->hwnd, HWND_TOP, -1, -1, settings->DesktopWidth + wfc->diff.x,
+                               settings->DesktopHeight + wfc->diff.y, SWP_NOMOVE | SWP_FRAMECHANGED);
+               }
        }
        else
        {