fix: delayed bounds when moving/resizing and preventing default (#34204)

This commit is contained in:
Shelley Vohr 2022-05-19 10:03:02 +02:00 committed by GitHub
parent 455544dfb6
commit 73e0bf973d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,6 +296,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
&prevent_default);
if (prevent_default) {
::GetWindowRect(hwnd, reinterpret_cast<RECT*>(l_param));
pending_bounds_change_.reset();
return true; // Tells Windows that the Sizing is handled.
}
return false;
@ -334,6 +335,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
NotifyWindowWillMove(dpi_bounds, &prevent_default);
if (!movable_ || prevent_default) {
::GetWindowRect(hwnd, reinterpret_cast<RECT*>(l_param));
pending_bounds_change_.reset();
return true; // Tells Windows that the Move is handled. If not true,
// frameless windows can be moved using
// -webkit-app-region: drag elements.