aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
AgeCommit message (Collapse)Author
2023-06-11gamma_control_v1: Reset dirty flagAlexander Orzechowski
2023-06-09desktop/output: fix damage bitfield in wlr_output_stateSimon Ser
2023-06-08desktop/output: use detached output state for page-flipsSimon Ser
This avoids relying on the implicit wlr_output.pending state.
2023-06-08Handle gamma-control-v1 set_gamma eventsSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
2023-06-05chase wlroots wlr_renderer_begin_buffer_pass changeArtturin
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( > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-06-02chore: chase wlroots map logic unificationKirill Primak
2023-05-02render: Use wlr_render_passAlexander Orzechowski
2023-05-02render: pass rendering state together in a structAlexander Orzechowski
This lets us easily add rendering state that we need in the future
2023-04-14Use output_match_name_or_id() in apply_output_config_to_outputs()Simon Ser
2023-04-14Introduce output_match_name_or_id()Simon Ser
Reduces code duplication.
2023-04-14Set output damage during direct scan-outSimon Ser
During direct scan-out, pass the damaged region to the wlroots backend.
2023-04-14Skip direct scan-out commit when damage is emptySimon Ser
When there is no damage, no need to perform an output commit, even when direct scan-out is used.
2023-04-06Chase wlroots!4067Alexander Orzechowski
2023-04-06Remove duplicate wlr_damage_ring_set_bounds() callSimon Ser
We already do this in handle_commit().
2023-04-06Fix damage-ring bounds not being set when unplugging -> plugging in monitorErik Reider
#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
2023-03-26Init the damage_ring bounds on output creationErik Reider
Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
2023-02-28Disable direct scanout for surfaces with popupsnovenary
2023-02-22Check for empty damage before attaching render bufferSimon Ser
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().
2023-02-22Move output commit out of output_render()Simon Ser
That way output_render() only does what it says on the tin.
2023-02-20Update surface fractional scale on output changeSimon Ser
Closes: https://github.com/swaywm/sway/issues/7464
2023-02-01ipc: add support for output eventSimon Ser
For compatibility with i3 [1]. [1]: https://i3wm.org/docs/ipc.html#_output_event
2023-01-23Apply new adaptive sync value from wlr-output-managementAlexander Courtis
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.
2023-01-03Replace math functions that promote float to doubleCarl Smedstad
2022-12-01sway/desktop/output: listen to output mode in commit handleSimon Zeni
2022-11-28Make DRM backend optionalSimon Ser
2022-11-15Listen to the output request_state eventSimon Ser
References: https://github.com/swaywm/wlroots/pull/2693
2022-11-12output: set damage ring bounds to pixel valuesKirill Primak
Fixes: https://github.com/swaywm/sway/issues/7254
2022-11-11Use wlr_damage_ringKirill Primak
wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
2022-09-19sway: Add non-desktop-output typeAlex Maese
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`
2022-07-04Remove internal references to DPMSSimon Ser
While at it, use an int for the config field, just like we do for all other fields.
2022-05-23ext-session-lock: disable direct scan-out when lockedDaniel De Graaf
2022-04-29Implement ext-session-lock-v1Daniel De Graaf
2022-01-31chore: chase wlr_output_layout_get_box() updateKirill Primak
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
2022-01-13Upgrade for wlroots surface refactoringSimon Ser
See [1] for details. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412
2021-12-17output: change output::destroy to output::disableRonan Pigott
This changes output::destroy to output::disable and emits it only once when an output is disabled, instead of twice in succession.
2021-12-09Fixup headless output namesSimon Ser
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
2021-12-06output: remove surface buffer damage checkKirill Primak
A surface can have effective damage even without any buffer damage committed.
2021-11-25sway: replace noop_output by fallback_outputSimon Zeni
wlroots removed the support for the noop backend. Instead we rely on the headless backend to provide the fallback output.
2021-11-18sway: create wlr_renderer and wlr_allocatorSimon Zeni
wlroots now required the compositor to create its own wlr_renderer and wlr_allocator to initialize the wlr_output
2021-10-15Handle present events with NULL timespec fieldSimon Ser
See [1]. [1]: https://github.com/swaywm/wlroots/pull/3245
2021-09-20Add -Dnoscanout debug optionSimon Ser
This can help debugging direct scan-out issues, such as [1]. [1]: https://github.com/swaywm/wlroots/issues/3185
2021-09-09introduce wlr_drm_lease_v1Simon Zeni
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.
2021-07-07Update wlr_box includesSimon Ser
Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
2021-04-26Remove support for arbitrary rotationsSimon Ser
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.
2021-04-26Remove usage of surface->sx|syKenny Levinsen
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.
2021-04-01output: damage whole output when exiting scanoutRonan Pigott
2021-03-11output: simplify layer surface iterationVyivel
2021-02-22Fix #5643, #5064: rounding issues in floating-point -> integer conversionsDimitris Triantafyllidis
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.
2021-01-26desktop/output: Disable head if mode is NULLKenny Levinsen
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.
2021-01-12Rename output_layer_for_each_surface_{toplevel,popup}Simon Ser
Swap the "surface" part for consistency with wlroots' naming.