mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
27fde06214
Thread messages will be dropped when the modal loop is running, meaning if the user is resizing/moving the window or invoking the window menu, we will lose input device events or the command to destroy the window. This CL uses a message-only window as a message router, whose HWND will be exposed to other threads. Instead of being posted to the WndProc thread itself, all those thread messages are now posted to this message router window, so that they will still be dispatched to our wnd_proc function while the modal loop is running. Other alternatives have been discussed in b/279810202. The lifetime of this new window is slightly shorter than that of the WndProc thread. When we are about to terminate KiwiVM, we will destroy the GUI window first, and then the message router window. The WndProc thread will exit after those are done. Now we have two types of windows in window.rs: MessageOnlyWindow and Window. The latter one will be renamed to GuiWindow in the follow-up CL. They implement the common trait, BasicWindow, to provide the basic functionalities such as exposing the HWND, destorying the window, etc. Bug: 279810202 Test: Ran GPG and tested basic windowing functionality Change-Id: I7bff35a9f435d2a4250dcf3aa93b39e0ca64faff Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804802 Reviewed-by: Noah Gold <nkgold@google.com> |
||
---|---|---|
.. | ||
examples | ||
protocol | ||
src | ||
build.rs | ||
Cargo.toml |