I just completed an "upgrade" of Winit for one of my GUI programs. It works on Linux, but, running a cross-compiled executable under Wine on Linux, there's a 2 second delay in processing keystroke events.
I'd appreciate it if someone tried building and running this on real Windows. I no longer have any real Windows machines around. That will make it clearer whether this is a Windows bug or a Wine bug.
Thanks.
(Cross-platform ordering of window events turns out to be more brittle than you would expect, and the game case, where you refresh as fast as you can, can have problems. This is the third bug in this area.)
No delay whatsoever on Windows 10 PC; very snappy.
You would probably get better testing results running in a proper VM, or dual booting. I don't know much about wine technically, but from using it over the years, it's prone to often opaque performance issues.
FYI You don't need wine ui-mock as the last part of your instructions as it's run on windows, should just be ui-mock.exe
Wine has a set of shared objects which emulate Windows DLLs. It doesn't use the Windows event loop or storage allocator. So this tells me where to look.
UI-mock is a test dummy for the graphics stack. It's just to show that the Rend3/Egui/Wgpu/Vulkan stack is alive, responding to input, and able to draw in 3D via the GPU.
If you move the cursor to the top or bottom of the screen, menus appear. Otherwise it's a clean screen with the cube, which just sits there. None of the menus do much in this test dummy.
The real program I'm working on is Sharpview, a metaverse client. Ui-mock is used to debug breaking changes in the graphics stack crates before I try them in Sharpview.
Next bug: under Wine 10, the hot spot for the cursor is now at the bottom of the arrow, rather than the point at the top. WTF?
Next bug after that: Wgpu "refactored" between version 23 to version 24. Now, Egui is out of sync. The version on crates.io and github have the same version number but differ. The Rend3/Egui/Winit/Wgpu crates all have to advance in lockstep, because a breaking change in one of them breaks the stack. With enough work on the many Cargo.toml files I can patch around this. Maybe tomorrow.
Rend3 was abandoned, so I have to maintain that myself, too. I'm going to have to put bindless mode in there to get the frame rate up. For that I will need a current Wgpu, because the bindless interface is going in at that level.
Using the Rust graphics stack is almost a full time job just to keep up with the churn. If I'd known this when I started, I would never have used Rust.