The Wayland protocol specifies output transform rotations to be
counterclockwise and applied to the surface. Previously, wlroots
copied Weston and incorrectly made rotations act clockwise on
surfaces. This commit fixes that.
This change will break compositors which expect transform rotations
to be clockwise, and the rare applications that make use of surface
transforms.
Due to the way the wlr_output API was changed, these examples would
never get a frame event to start the rendering loop. We now commit the
outputs to start it.
Having 1.16 results in the following error when running the compositor:
2019-04-27 17:30:50 - [wayland] wl_global_create: implemented version for 'wl_seat' higher than interface version (7 > 6)
2019-04-27 17:30:50 - [sway/input/seat.c:428] seat_create:could not allocate seat
We require wayland-server >= 1.17 for wl_seat version 7.
Fixes: a671fc51d2 ("Advertise wl_seat version 7")
Fixes: a656e486f4 ("seat: fallback to v6 if libwayland 1.17 isn't available")
The previous PR was overzealous in adding a finish_drm_surface call
which was also done by the caller. Remove the call and also move the
comment to the correct code location.
In some cases modesets fail if the planes are initialized with
modifiers. Since in this case possibly all planes need to reinitialized,
which is not possible in the current wlroots design, add an environment
variable for affected users.
There was an issue in 0.51.1 and earlier, where lists of dependencies
and disablers weren't acting like they should. Instead of disabling a
build, it would error out instead.
Changing this logic to work around it is annoying, so just bump the
version instead.
Previously, an error on the remote Wayland display would result in an
infinite loop priting:
2020-01-09 13:39:03 - [wayland] Source dispatch function returned negative value!
2020-01-09 13:39:03 - [wayland] This would previously accidentally suppress a follow-up dispatch
This happens when the remote compositor disconnects the client because
of a protocol error, for instance.
Handle wl_display_dispatch and wl_display_dispatch_pending returning -1
by terminating the local display and printing an error.
Previously, we just assumed submitting a new frame would make the
compositor release the current one. This isn't always the case, for
instance Sway retains old buffers when a transaction is pending. This
resulted in synchronization issues with clients writing in
front-buffers.
Fix this by un-referencing a wlr_buffer when the parent compositor sends
wl_buffer.release.
Tested by running a fullscreen mpv instance in Sway with the Wayland
backend.
Add a wlr_renderer.rendering bool, set it to true between
wlr_renderer_begin() and wlr_renderer_end(). Assert we're rendering when
calling functions that render.
When running wlroots compositors with Xwayland executable bits
unset, if DISPLAY is set to the display number wlroots has set
up, then X and gtk clients (at least) hang when they are ran.
X clients should fail with an error and exit while gtk clients
should fall back to wayland backend and run correctly. This is
because wlroots opened sockets for Xwayland but wasn't closing
them if Xwayland failed to start.
This fixes a segfault in drm_connector_set_mode (mode = NULL).
This happens because we set wlr_output.enabled to true if the connector
is attached to the CRTC. When the user disables an output in the
wlroots-based compositor, switches to another VT (enabling the output),
then switches back, wlroots sets wlr_output.enabled to true but
wlr_output.current_mode is NULL.
We should consider not reading properties from KMS after a TTY switch,
disabling all connectors. However this may result in flickering (outputs
being disabled then re-enabled).
Closes: https://github.com/swaywm/wlroots/issues/1874
Most resources must not be NULL. Make it so callers need to check for
NULL explicitly. This makes it clearer in the handlers code that the
NULL wl_resource case needs to be handled, and allows callers to make a
difference between a NULL wl_resource and an inert resource.
This fixes a memory leak the refresh_state function for
wlr_keyboard_group. The event struct was being dynamically allocated and
never free'd. This changes it to a static allocation.
Since [1], the xdg-output description is mutable. Listen to output
description changes and send the new output description when updated.
[1]: 048102f21a
wlr_output.description is a string containing a human-readable string
identifying the output. Compositors can customise it via
wlr_output_set_description, for instance to make the name more
user-friendly.
References: https://github.com/swaywm/wlroots/issues/1623