From 09755d5bfe92f1e21057ef5b3aec47beb69c7037 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 29 Apr 2021 21:25:20 +1000 Subject: [PATCH] [windows] Adjust when resizing --- v2/internal/ffenestri/ffenestri_windows.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/v2/internal/ffenestri/ffenestri_windows.cpp b/v2/internal/ffenestri/ffenestri_windows.cpp index 68bde586e..c2d599a21 100644 --- a/v2/internal/ffenestri/ffenestri_windows.cpp +++ b/v2/internal/ffenestri/ffenestri_windows.cpp @@ -70,14 +70,14 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { DestroyApplication(app); break; } -// case WM_SIZE: { -// if( app->webviewController != nullptr) { -// RECT bounds; -// GetClientRect(app->window, &bounds); -// app->webviewController->put_Bounds(bounds); -// } -// break; -// } + case WM_SIZE: { + if( app->webviewController != nullptr) { + RECT bounds; + GetClientRect(app->window, &bounds); + app->webviewController->put_Bounds(bounds); + } + break; + } case WM_GETMINMAXINFO: { // Exit early if this is called before the window is created. if ( app == NULL ) { @@ -179,6 +179,7 @@ void Run(struct Application* app, int argc, char **argv) { HINSTANCE hInstance = GetModuleHandle(NULL); ZeroMemory(&wc, sizeof(WNDCLASSEX)); wc.cbSize = sizeof(WNDCLASSEX); + wc.style = CS_HREDRAW | CS_VREDRAW; wc.hInstance = hInstance; wc.lpszClassName = (LPCWSTR)"ffenestri"; wc.lpfnWndProc = WndProc;