Calling request_request() during RedrawRequested would not work on
Windows and wasm. Commit 372e6b0ffc worked
around this, but that can be reverted now, as this is fixed in winit.
For windows that was https://github.com/rust-windowing/winit/pull/3165
and for wasm I couldn't find the change, but could verify that it still
works.
I checked that #1574 does not regress.
Besides the cleanup, this is also needed for #1695.
We don't need to wait 16ms, we could render right away. In theory this could also use invoke_from_event_loop, but then
the callback needs to be sync, which is an unnecessary
complication.
That's less boiler plate for us and better error handling (note how the receive_events()
call on the DRM device now propagates the error). And this also unregisters automatically
on drop.
... instead pass the fd into the calloop event loop and change state when we receive activity on it.
This improves performance slightly, and is a necessary to be able to implement refresh rate throttled rendering (in the next commits).
This patch adds support for the `SLINT_KMS_ROTATION` environment
variable, that instructs the Skia/FemtoVG renderers to rotate
the scene before rendering.
Try to fix the issue #3911.
In 1.3.0, the function "adjust_window_size_to_satisfy_constraints" is deleted.
I guess that, in Winit 0.29.x, the window will automatically resize, but, at least, it doesn't work on Windows.
So, I try to add this function back.
This might fix the issue with resizing causing swapchain re-creation
errors, because "Swapchain creation no longer returns an error when the
swapchain extent doesn't match the current surface extent."
cc #3850
calling show() on a visible window or hide() on a hidden window
shouldn't do anything.
Especially currently it would resize to the preferred size.
So that makes the preview UI to alsways resize to the preferred size
because we always call show()
This way if for example the application quits the event loop while
pressed is true, and then resumes shortly afterwards, we maintain the
pressed state correctly.
Port to the latest accesskit and accesskit_winit:
- NodeId is now a u64 instead of u128, so trim the component/item encoding.
- Adjust to some enum renamings.
- TreeUpdate now always requires a focus node, which we set to the root.
- Fixed focus handling on macOS: Report FocusIn to the accesskit
adapter, so that it can update its internal host_is_focused state
correctly.
Not sure why, but it fixes that applying the constraints is otherwise
not working with winit on X11
This is not the first time we do this fix:
723f89d342 and 1891e4489a
Commit f24014a2dd made the insert function
private. Let's solve this differently by creating a private WASM
clipboard and invoking copy() and paste() on the Text item instead.
The first attempt was implementing a ClipboardProvider just for the wasm
build, just like with SilentClipboard, but unfortunately that doesn't
work because in the backend's set_clipboard_text()/clipboard_text()
functions, there's no currently running winit event loop that we could
access, becaused the call stack starts directly at the DOM event
handler, not in our winit event handler.
On wayland, we may not be getting a resize event, after issuing `request_inner_size()`.
Without that, we would fail to size the EGL surface correctly.
Centralize all request_inner_size() call sites
and dispatch a "local" resize event if the new size is returned by winit.
Fixes#1671