orbtk
orbtk copied to clipboard
First click is lost when not in focus
Hello, Describe the bug When the OrbTk window isn't focused, clicking on components (e.g. buttons) does nothing but regain focus. Clicks on components are only registered if the window is already focused. To Reproduce Steps to reproduce the behavior:
- git clone https://github.com/redox-os/orbtk.git
- cd orbtk
- cargo run --example widgets --release
- click/focus a different window
- click on the dropdown menu under Items
- OrbTk window regains focus but nothing else happens
Expected behavior The first click should be registered and in the reproduction example, the dropdown menu should open.
Desktop (please complete the following information):
- OS: Win10 1909
Additional Information This was introduced in alpha4, alpha3 works as expected.
Hi, thank you for the report. This is a difficult one. With the default OrbClient based backend events occurs only on focused window. I have there issues with sdl2 which is the implementation of OrbClient on not Redox. An issue which is connected to this is that I get window resize event only after resizing is stopped.
Thanks for the explanation.
Out of curiosity, what's the longer term plan in regards to the backend for OrbTk?
At the moment we evaluate different possibilities. I hope that we can find or implement a backend that complete run cross platform on Redox, Linux (x11 + Wayland), macOS, Windows, Android, iOS, Ubuntu Touch and web. But I think until then we have to live with multiple backends.
The most stable and most cross platform backend is miniraq (minifb and raqote). Most feature complete backend is orbraq (OrbClient and raqote). At next I will test a backend build with winit, pixels (hardware accelerated frame buffer) and raqote. One of our contributors is also testing a skia backend for rendering and works on a window / event / frame buffer library.
I'm changing the title of the window occasionally. I noticed that not just the first click is lost, but the title of the window is changed only after I click into the window.