From 38dd2a7c91b922d185f193198103da5a41d05c8b Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 13:57:12 +0200 Subject: [PATCH] fix: delayed bounds when moving/resizing and preventing default (#34282) Co-authored-by: Shelley Vohr --- shell/browser/native_window_views_win.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index f1af57ccc3d4a..247aeb29faf05 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -294,6 +294,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message, &prevent_default); if (prevent_default) { ::GetWindowRect(hwnd, reinterpret_cast(l_param)); + pending_bounds_change_.reset(); return true; // Tells Windows that the Sizing is handled. } return false; @@ -332,6 +333,7 @@ bool NativeWindowViews::PreHandleMSG(UINT message, NotifyWindowWillMove(dpi_bounds, &prevent_default); if (!movable_ || prevent_default) { ::GetWindowRect(hwnd, reinterpret_cast(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.