Age | Commit message (Collapse) | Author |
|
|
|
|
|
This avoids relying on the implicit wlr_output.pending state.
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
|
|
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4159
> ../sway/desktop/output.c:618:47: error: too few arguments to function 'wlr_renderer_begin_buffer_pass'
> 618 | struct wlr_render_pass *render_pass = wlr_renderer_begin_buffer_pass(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
This lets us easily add rendering state that we need in the future
|
|
|
|
Reduces code duplication.
|
|
During direct scan-out, pass the damaged region to the wlroots
backend.
|
|
When there is no damage, no need to perform an output commit, even
when direct scan-out is used.
|
|
|
|
We already do this in handle_commit().
|
|
#7524 was a partial fix. Seems like this is still an issue when
unplugging and plugging the monitor back in.
Closes: https://github.com/swaywm/sway/issues/7528
|
|
Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
|
|
|
|
Check whether output->damage_ring.current is empty before calling
wlr_output_attach_render(). Saves us from having to un-do that
via wlr_output_rollback().
|
|
That way output_render() only does what it says on the tin.
|
|
Closes: https://github.com/swaywm/sway/issues/7464
|
|
For compatibility with i3 [1].
[1]: https://i3wm.org/docs/ipc.html#_output_event
|
|
fixes #7394
Test cases:
* zwlr_output_configuration_head_v1_set_adaptive_sync 0->0, no change
* 0->1, enabled
* 1->0, disabled
* 1->1, no change
Similar tests with an incapable display resulted in `"Adaptive sync
failed, ignoring"` messages as expected.
|
|
|
|
|
|
|
|
References: https://github.com/swaywm/wlroots/pull/2693
|
|
Fixes: https://github.com/swaywm/sway/issues/7254
|
|
wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
|
|
Currently, when encountering a non-desktop display, sway offers the
output for leasing and returns without storing it in a sway specific
output type like `struct sway_output`. Additionally, running
`swaymsg -t get_outputs` doesn't show non-desktop outputs.
This commit stores the non-desktop outputs into a struct called
`sway_output_non_desktop`, and adds them to a list on `sway_root`
|
|
While at it, use an int for the config field, just like we do for
all other fields.
|
|
|
|
|
|
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
|
|
See [1] for details.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412
|
|
This changes output::destroy to output::disable and emits it only
once when an output is disabled, instead of twice in succession.
|
|
We use the headless backend to create a special fallback output
used when no other output is connected. However this messes up the
"real" headless output names users have come to expect (e.g.
currently the first headless output will be named "HEADLESS-2"
instead of "HEADLESS-1").
Fix this by setting the output name with [1].
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3395
|
|
A surface can have effective damage even without any buffer damage
committed.
|
|
wlroots removed the support for the noop backend. Instead we rely on the
headless backend to provide the fallback output.
|
|
wlroots now required the compositor to create its own wlr_renderer and
wlr_allocator to initialize the wlr_output
|
|
See [1].
[1]: https://github.com/swaywm/wlroots/pull/3245
|
|
This can help debugging direct scan-out issues, such as [1].
[1]: https://github.com/swaywm/wlroots/issues/3185
|
|
This prevents sway from extending the desktop to i.e. VR headsets, and makes
them available for DRM leasing.
Non-desktop wlr_outputs will be offered through the wlr_drm_lease_v1_manager
interface for client to lease.
|
|
Update for the breaking change in [1].
[1]: https://github.com/swaywm/wlroots/pull/3011
|
|
There was some unused code-paths for rendering surfaces with an
arbitrary rotation applied. This was imported from rootston.
Since we don't have plans to make use of this, remove it.
|
|
These coordinates contain the all-time accumulated buffer attach point,
which is a way to perform incremental client-side initiated movement of
windows, intended as a way to maintain logical window positioning while
compensating for layout changes such as folding in a left side panel.
This value is not useful for implementing this feature, and break things
if they ever become non-zero. Their inclusion in calculations also tend
to cause confusion.
Remove usage of these coordinates, removing the ability for clients to
move themselves. This may again be supported if a better API is made
available from wlroots.
|
|
|
|
|
|
Currently, various floating-point expressions involving
the coordinates of borders, titlebars and content surfaces
are directly assigned to integers, and so they are rounded
towards zero.
This results in off-by-one distances between these elements
when the signs of their coordinates differ.
Fixed by wrapping these expressions with a call to
floor before the assignment.
|
|
wlr_output_configuration_head_v1_create normally fills out the head
"enabled" field to match the wlr_output state. We overwrite this to also
set the head as enabled if it is only turned off with DPMS.
However, in some cases we may not have a mode for this display, in which
case setting it as enabled will lead to a segfault later on. Therefore,
enabled conditional on the presence of a mode.
|
|
Swap the "surface" part for consistency with wlroots' naming.
|