crosvm/gpu_display
Pujun Lun 27fde06214 Replace thread messages with a message router window.
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>
2023-09-25 12:33:21 +00:00
..
examples tree-wide: apply nightly rustfmt 2023-03-27 21:30:45 +00:00
protocol health-check: Add check for newline at ends of files 2022-08-18 00:17:04 +00:00
src Replace thread messages with a message router window. 2023-09-25 12:33:21 +00:00
build.rs gpu_display: find wayland-scanner with which in build.rs 2023-02-27 21:18:21 +00:00
Cargo.toml Cargo.toml: depend on zerocopy 0.6 explicitly 2023-09-20 21:28:58 +00:00