When the user queries the physical position of the window after setting a logical position, but we don't have a window, use the last known scale factor.
Call resume() on the renderer in one place, instead of several.
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
On Wayland hiding a window requires destroying the surface, which
means destroying the winit window as well as the underlying graphics
surface. The latter is tricky as we have to keep the renderer around,
as our WindowAdapter trait's `renderer()` function returns a `&dyn
Renderer` and that also has to work without a window (to obtain text
metrics).
Fixes#4225
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
Valgrind would report invalid reads on the wayland clipboard shutdown code, suggesting that the wayland
display has already been destroyed.
Since the display handle isn't refcounted, we must make sure that the wayland clipboard is around as long as the wayland display handle, provided by the winit event loop.
- The cfg_aliases crate does it out of the box already
- Don't create a build.rs for this only purpose when it can be added in
Cargo.toml lints group. (This wasn't possible when the warning was
first introduced in nightly)
That way one can also simulate double right click, for example. This is a little less convenient, more generic, but a reasonable compromise (perhaps :-)
Fixes#5489
We shouldn't resize the window to the size of the WindowItem after
start. This happens when set_size is called before show. The the
resize event didn't yet propagate the size to the WindowItem properties.
This assumes the same xrgb888 interface that the drm dumb buffer uses, too. Missing, beyond different pixel depths is:
- mode setting (requires fbset on the command line right now)
- vsync (not sure if possible)
- line padding
That requires implementing the ApplicationHandler trait and adds an extra dispatching impl to ensure the active event loop ref is set in TLS.
Also allow the deprecated create_window() for now.
When the popup window is destroyed, the hack we did to close the app on
the last window was too aggressive with Qt6 and closed the application
when it shouldn't have.
Fixes#4803
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.