mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 03:57:24 +00:00
We do receive WM_ENTERSIZEMOVE when the window is about to be resized or moved, but it doesn't tell us whether resizing or moving should be expected. We won't know that until later we receive WM_SIZING or WM_MOVING. There are also corner cases where we don't receive either WM_SIZING or WM_MOVING in the modal loop, or receive both of them. This CL adds an enum SizeMoveLoopState to track this state, so that we can know whether the window is resizing or moving. One alternative is to use WM_NCHITTEST to test whether the cursor is on the window title bar (which implies moving the window) or window borders/corners (which implies resizing) when WM_ENTERSIZEMOVE is received. However, the user may also trigger resizing/moving from the system menu (e.g. by right-clicking on the title bar and selecting it from the drop down list), so this is not always reliable. BUG=b:254702853 TEST=Tested in the Windows downstream Change-Id: I8c8d97a7542b291c57dbddb75d785b324ff2776e Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3975933 Commit-Queue: Pujun Lun <lunpujun@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
examples | ||
protocol | ||
src | ||
build.rs | ||
Cargo.toml |