aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
Commit message (Collapse)AuthorAge
* config/output: Search for output config fallbacksLibravatar Kenny Levinsen2 days
| | | | | | | | | | | | | | | | The original sway output config implementation enabled one output at a time, testing modes, render formats and VRR support as it went along. While this sort of fallback is easy to do, it has the downside of not considering the effect of neighbor outputs on the configuration viability. With backend-wide commits, we can now better consider the effect of neighbor outputs, but to handle the fact that we commit all outputs at once we need to perform a more elaborate search of viable configurations. Implement a recursive configuration search for when the primary configuration failed to apply.
* desktop/output: Fix check if config should be storedLibravatar Kenny Levinsen11 days
| | | | | | | | | We want to check if a config_head existed for the current matched_output_config, so we should check cfg->output. sway_output is a temporary variable from a previous wl_list_for_each, and does not contain anything useful to us. Fixes: https://github.com/swaywm/sway/issues/8128
* desktop/output: Use apply_output_configs for output mgmtLibravatar Kenny Levinsen2024-03-28
|
* Use apply_all_output_configs to light up outputsLibravatar Kenny Levinsen2024-03-28
| | | | | This allows us to test and if necessary degrade the entire backend configuration to light everything up.
* Force bilinear scaling when scaling downLibravatar Alexander Orzechowski2024-03-09
|
* Define _POSIX_C_SOURCE globallyLibravatar Simon Ser2024-02-23
| | | | See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
* Drop unnecessary includes from sway/server.hLibravatar Simon Ser2024-02-15
|
* scene_graph: Port opacity and filter modesLibravatar Alexander Orzechowski2024-01-18
|
* Delete old damage tracking codeLibravatar Alexander Orzechowski2024-01-18
| | | | The new scene graph abstraction handles this for us.
* scene_graph: Port xwaylandLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port xdg_shellLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port layer_shellLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port ext_session_v1Libravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port seat drag iconsLibravatar Alexander Orzechowski2024-01-18
|
* renderer: Render scene_graphLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Maintain `wlr_scene_node`s for the sway tree.Libravatar Alexander Orzechowski2024-01-18
|
* desktop: Rename layers to shell_layersLibravatar Alexander Orzechowski2024-01-18
| | | | | This code will be deleted later, but for the time being rename it so it doesn't conflict with future properties.
* Chase wlroots!4482Libravatar Bill Li2023-12-27
|
* output: Destroy when output layout is destroyedLibravatar Alexander Orzechowski2023-12-13
| | | | | | | | | | | | | Since output layout is destroyed when the wayland display is destroyed we run into a destroy listener order problem: Either the display starts destroying the outputs first, in which case we're good: The existing handling will clean up. However, things go wrong if the display decides to destroy the output layout first. In this case, sway will hold invalid references to the output layout as part of each output so that when it finally goes to destroy them, sway will dereference destroyed output layout bits. Ref: https://github.com/swaywm/sway/pull/6844#issuecomment-1843599513
* Add wlr/util/transform.h includesLibravatar Simon Ser2023-11-23
| | | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4097 Closes: https://github.com/swaywm/sway/issues/7830
* Fix reference to wlr_output_event_commit.committedLibravatar Simon Ser2023-11-21
| | | | This has been dropped from wlroots. Previous commit missed that.
* Apply gamma LUT when an output re-enabledLibravatar Simon Ser2023-11-21
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3679
* chase wlroots!4411Libravatar Bill Li2023-10-31
| | | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4411 fix #7802
* Chase wlroots!4331Libravatar Alexander Orzechowski2023-10-06
|
* desktop/output: fix output manager enabled stateLibravatar Simon Ser2023-07-31
| | | | | | | | | With recent wlroots changes, backends which don't support output modes can now support being disabled. We were always marking mode-less outputs as disabled. Stop doing that, check whether the output takes up some space in the layout instead.
* desktop/output: drop handle_mode()Libravatar Simon Ser2023-07-31
| | | | We already perform the exact same logic on transform/scale change.
* desktop/output: drop logic to handle backend-applied modeLibravatar Simon Ser2023-07-31
| | | | | The wlroots backends no longer magically apply output modes behind the compositor's back.
* chase wlroots 'presentation-time: add separate helper for zero-copy 'Libravatar Artturin2023-07-15
| | | | https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/67447d6cb407ac5b6405b4dbae01a38567feb111
* gamma_control_v1: handle destroyed outputLibravatar Rouven Czerwinski2023-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a display is unplugged, the sway output may be removed from the userdata before the gamma_control can be reset. In this case we can't schedule a commit on the output, simply return within the function. backtrace full: #0 handle_gamma_control_set_gamma (listener=0x4856a8 <server+616>, data=0x7ffce1ed59c0) at ../sway/desktop/output.c:1105 server = 0x485440 <server> event = 0x7ffce1ed59c0 output = 0x0 #1 0x00007f430d1dca0c in wl_signal_emit_mutable () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0 No symbol table info available. #2 0x00007f430d142370 in gamma_control_destroy (gamma_control=0x29eb9b0) at ../types/wlr_gamma_control_v1.c:37 manager = 0x27e33e0 output = 0x2a10770 event = {output = 0x2a10770, control = 0x0} #3 0x00007f430d14239b in gamma_control_handle_output_destroy (listener=<optimized out>, data=<optimized out>) at ../types/wlr_gamma_control_v1.c:59 gamma_control = <optimized out> #4 0x00007f430d1dca0c in wl_signal_emit_mutable () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0 No symbol table info available. #5 0x00007f430d12a0e0 in wlr_output_destroy (output=output@entry=0x2a10770) at ../types/output/output.c:384 cursor = <optimized out> tmp_cursor = <optimized out> layer = <optimized out> tmp_layer = <optimized out> #6 0x00007f430d114ecf in disconnect_drm_connector (conn=conn@entry=0x2a10770) at ../backend/drm/drm.c:1757 __PRETTY_FUNCTION__ = "disconnect_drm_connector" #7 0x00007f430d117078 in scan_drm_connectors (drm=drm@entry=0x1eebab0, event=event@entry=0x7ffce1ed5c1c) at ../backend/drm/drm.c:1597 c = <optimized out> wlr_conn = 0x2a10770 drm_conn = 0x2e760d0 conn_id = <optimized out> index = 4 i = 4 res = 0x2e761f0 seen_len = 5 seen = {true, true, true, true, true, false} new_outputs_len = 0 new_outputs = 0x7ffce1ed5ab0 conn = <optimized out> tmp_conn = <optimized out> index = <optimized out> #8 0x00007f430d113425 in handle_dev_change (listener=0x1eebbb0, data=0x7ffce1ed5c18) at ../backend/drm/backend.c:157 drm = 0x1eebab0 change = 0x7ffce1ed5c18 #9 0x00007f430d1dca0c in wl_signal_emit_mutable () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0 No symbol table info available. #10 0x00007f430d111696 in handle_udev_event (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../backend/session/session.c:213 event = {type = WLR_DEVICE_HOTPLUG, {hotplug = {connector_id = 0, prop_id = 0}}} devnum = <optimized out> dev = 0x1ed9460 session = <optimized out> udev_dev = 0x2e70db0 sysname = 0x2e73c60 "card0" devnode = <optimized out> action = 0x7f430d6677b5 "change" seat = <optimized out> __PRETTY_FUNCTION__ = "handle_udev_event" #11 0x00007f430d1de8e2 in wl_event_loop_dispatch () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0 No symbol table info available. #12 0x00007f430d1dc445 in wl_display_run () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0 No symbol table info available. #13 0x000000000041daa5 in server_run (server=server@entry=0x485440 <server>) at ../sway/server.c:338 No locals. #14 0x000000000041cf4d in main (argc=<optimized out>, argv=0x7ffce1ed5fe8) at ../sway/main.c:415 verbose = false debug = false validate = false allow_unsupported_gpu = false config_path = 0x0 c = <optimized out> where event->output->data is NULL: (gdb) p event->output->data $5 = (void *) 0x0
* gamma_control_v1: Reset dirty flagLibravatar Alexander Orzechowski2023-06-11
|
* desktop/output: fix damage bitfield in wlr_output_stateLibravatar Simon Ser2023-06-09
|
* desktop/output: use detached output state for page-flipsLibravatar Simon Ser2023-06-08
| | | | This avoids relying on the implicit wlr_output.pending state.
* Handle gamma-control-v1 set_gamma eventsLibravatar Simon Ser2023-06-08
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
* chase wlroots wlr_renderer_begin_buffer_pass changeLibravatar Artturin2023-06-05
| | | | | | | | 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( > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* chore: chase wlroots map logic unificationLibravatar Kirill Primak2023-06-02
|
* render: Use wlr_render_passLibravatar Alexander Orzechowski2023-05-02
|
* render: pass rendering state together in a structLibravatar Alexander Orzechowski2023-05-02
| | | | This lets us easily add rendering state that we need in the future
* Use output_match_name_or_id() in apply_output_config_to_outputs()Libravatar Simon Ser2023-04-14
|
* Introduce output_match_name_or_id()Libravatar Simon Ser2023-04-14
| | | | Reduces code duplication.
* Set output damage during direct scan-outLibravatar Simon Ser2023-04-14
| | | | | During direct scan-out, pass the damaged region to the wlroots backend.
* Skip direct scan-out commit when damage is emptyLibravatar Simon Ser2023-04-14
| | | | | When there is no damage, no need to perform an output commit, even when direct scan-out is used.
* Chase wlroots!4067Libravatar Alexander Orzechowski2023-04-06
|
* Remove duplicate wlr_damage_ring_set_bounds() callLibravatar Simon Ser2023-04-06
| | | | We already do this in handle_commit().
* Fix damage-ring bounds not being set when unplugging -> plugging in monitorLibravatar Erik Reider2023-04-06
| | | | | | #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
* Init the damage_ring bounds on output creationLibravatar Erik Reider2023-03-26
| | | Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
* Disable direct scanout for surfaces with popupsLibravatar novenary2023-02-28
|
* Check for empty damage before attaching render bufferLibravatar Simon Ser2023-02-22
| | | | | | 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().
* Move output commit out of output_render()Libravatar Simon Ser2023-02-22
| | | | That way output_render() only does what it says on the tin.
* Update surface fractional scale on output changeLibravatar Simon Ser2023-02-20
| | | | Closes: https://github.com/swaywm/sway/issues/7464
* ipc: add support for output eventLibravatar Simon Ser2023-02-01
| | | | | | For compatibility with i3 [1]. [1]: https://i3wm.org/docs/ipc.html#_output_event