fix: pend bounds change when moving BrowserWindows (#33288)

* fix: ensure bounds changes apply when moving windows

* chore: remove unused queue include
This commit is contained in:
Shelley Vohr 2022-03-22 07:07:09 +01:00 committed by GitHub
parent c262eac441
commit f5112632a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View file

@ -314,6 +314,15 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
NotifyWindowMoved();
is_moving_ = false;
}
// If the user dragged or moved the window during one or more
// calls to window.setBounds(), we want to apply the most recent
// one once they are done with the move or resize operation.
if (pending_bounds_change_.has_value()) {
SetBounds(pending_bounds_change_.value(), false /* animate */);
pending_bounds_change_.reset();
}
return false;
}
case WM_MOVING: {