Only the hand-picked sensible things, not all of it ;-)
Also fix a few typos that cspell complained about when I
tried to commit and some formatting changes that cargo fmt
insisted on when commiting.
The rust_window is initialized shortly after the constructor is
finished, but changeEvent can happen before that/
The warning can be shown in the log of #4803 (but that is not the cause of the bug)
gbm.rs' lock_front_buffer calls has_free_buffers before calling the underling C lock_front_buffer function on the gbm surface. This has_free_buffers() check succeeds the first time but always fails after that.
However apart from this check, everything else appears to be working perfectly fine. Projects like weston, ksmcube, Qt, or mutter don't do this check beforehand either, so this patch works around gbm.rs by skipping this.
Unfortunately this requires going to gbm-sys directly and implementing the drm traits that require calling the various gbm_bo_get_* functions to retrieve the buffer details for posting to DRM.
If border-width == with or height of the rectangle we're trying to draw,
we will end up drawing an empty rectangle as we substract border-width/2
from both sides.
Rectangle with border-width bigger than half the size of the rectangle
don't make sense anyway, as it is fully covered by the border. So limit
the size of the border to half the size of the rectangle
The trick is that the backend selector build by default with the
i-slint-backend-qt, but the "enable" feature is only enabled if the
qt-backend feature is enabled explicitly, or on linux from the slint
or slint-interpreter crate
As discussed a few days ago, let's define rotation to be always
clockwise, as it is done in other graphics frameworks as well as our
own image rotation. This means changing the definition for the
software renderer. Also fixed docs for the enum in the linuxkms backend
that was wrong.
Fixes#4500
When the WindowAdaptor is dropped, deleteLater is used on the C++ QWidget.
On wayland, we still recieve a mouse exit event when the widget is about
to be deleted. This calls a callback into the deleted Rust WindowAdaptor.
Don't activate the canvas by default, as that causes winit to call focus() on the DOM element, which in turn will forcibly scroll the browser window.
That means any existing anchors are ignored and the user's scroll preference is disturbed.
Fixes#4431
The Skia OpenGL renderer is portable and sometimes esp. on Windows produces better results, so make it always available as an open if `renderer-skia` is enabled. `renderer-skia-opengl` continues to select the GL renderer as default.
They are not commonly used so no need to use semi-public api for that
and it's really easy to similate with ust two clicks anyway
The previous test function were added before there was public way to
send events
Otherwise there will be a huge queue of request redraw command that
accumulate within winit.
This makes operation such as resizing a bit more soomth
Tested on X11
Commit 41bfe66447 bumped accesskit
dependencies, which introduced a version that uses threads.
That means the action handler as well as the initial tree update source
closure are destroyed in a thread that's not the ui thread. That means
we destruct a SenderWrapper<Weak<WinitWindowAdapter>> in a thread that
is not the same as the one the wrapper was created in, which causes
Drop for SendWrapper to panic.
Replace the use of SendWrapper here with safely copyable window ids.