This commit also tweaks the riverctl interface to make the global
allow-tearing option apply only to tearing-control-v1 hints from
clients. The global option no longer affects tearing/no-tearing rules
explicitly created by the user.
Implement the wp-tearing-control-v1 protocol allowing window to hint
the compositor that they prefer async "tearing" page flips.
Add tearing/no-tearing rules to allow the user to manually
enabled/disable tearing for a window.
Use async "tearing" page flips when a window that should be allowed to
tear is fullscreen.
This still requires several kernel patches to work with the wlroots
atomic DRM backend. For now, either set WLR_DRM_NO_ATOMIC=1 or use a
custom kernel that includes the unmerged patches (such as CachyOS).
Closes: https://codeberg.org/river/river/issues/1094
Making these reparent() calls unconditional avoids inconsistent state.
It's also simpler and less error-prone and the wlroots function returns
immediately if the parent doesn't change anyways.
It is possible for a layer surface to notably delay its initial commit;
for example shotman[1] creates two layer surfaces and uses one of them
to get enough information for a screenshot and initializing the other.
River could also have sent a configure before initial commit if two
clients raced against each other.
Fixes https://codeberg.org/river/river/issues/1123
[1]:https://sr.ht/~whynothugo/shotman/
This is done specifically for lxqt-runner and qterminal to work as
expected, consistently among (almost) all compositors with layer-shell.
The most prominent drawback of this is that top- and overlay-layer
status bars with on_demand interactivity also get focus on map.
See https://codeberg.org/river/river/issues/1111 for more details.
The assertion in PointerConstraint.confine() can currently still be
triggered if the input region of a surface is changed and the pointer is
moved outside of the new intersection of input region and constraint
region before PointerConstraint.updateState() is called.
This can happen, for example, when a client is made non-fullscreen at
the same time as the pointer is moved across the boundary of the new,
post-fullscreen, input region. If the pointer crosses the boundary
before the transaction completes and updateState() is called, the
assertion in PointerConstraint.confine() will fail.
To fix this, listen for the surface commit event rather than the
set_region event to handle possible deactivation on region changes.
Currently keyboard focus is stolen from layer surfaces with
on_demand keyboard interactivity any time Root.applyPending() is called.
This commit fixes the behavior to only steal focus when explicitly
focusing a different window/layer surface.
Currently we send the first configure for xdg popups before the popup
has made its initial commit. This is incorrect according to the protocol
and may confuse clients.
The wlroots Wayland backend does not support gamma LUT application and
will currently fail to render anything if river commits a gamma LUT.
To fix this, test the state when applying a gamma LUT and fall back to a
state with no gamma LUT set if that fails.
This problem was revealed by 2e09b66 which flags gamma as dirty on all
outputs when they are enabled.
The X11 protocol uses 16 bit integers for width/height but we use
32 bit integers everywhere else in river. Make sure that values outside
the range of a 16 bit integer don't cause river to crash with an
assertion failure.
I think that coordinates outside the range of a 16 bit integer could
theoretically be reasonable with tiled high resolution displays in the
future. I doubt they ever get used in practice today but at the same
time we can't allow an errant layout generator to crash river.
We must clean up the user data of the wlr_surface for layer surfaces and
lock surfaces as fromSurface() may be called (e.g. by the idle inhibit
implementation) after the scene node has been destroyed but before the
wlr_surface is destroyed.
There is no FreeBSD tarball from ziglang.org and FreeBSD itself has not
yet updated their Zig package to 0.12.0. This commit should be reverted
when a good way is found to obtain Zig 0.12.0 for the FreeBSD CI.
This assert is incorrect if Xwayland is enabled and an Override Redirect
window steals the keyboard focus from the parent surface.
It also seems likely to be hit if a Wayland client attempts to use a
pointer constraint on a subsurface. I don't think a pointer constraint
on a subsurface is likely to work entirely correctly and I don't know of
any Wayland clients that try such a thing. We can't let them crash river
by trying though.