aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/output.h
Commit message (Collapse)AuthorAge
* config/output: drop enabling flagLibravatar Simon Ser2024-03-08
| | | | | This was useful when wlroots backends were updating the current mode on their own. This is no longer the case.
* 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 layer_shellLibravatar Alexander Orzechowski2024-01-18
|
* renderer: Remove in favor of scene_graphLibravatar 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.
* 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
* output: drop current_modeLibravatar Simon Ser2023-07-31
| | | | This is now unused.
* Handle gamma-control-v1 set_gamma eventsLibravatar Simon Ser2023-06-08
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
* 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
|
* Move output commit out of output_render()Libravatar Simon Ser2023-02-22
| | | | That way output_render() only does what it says on the tin.
* Constify pixman_region32_t for rendering functionsLibravatar Simon Ser2023-02-22
|
* sway/desktop/output: listen to output mode in commit handleLibravatar Simon Zeni2022-12-01
|
* Listen to the output request_state eventLibravatar Simon Ser2022-11-15
| | | | References: https://github.com/swaywm/wlroots/pull/2693
* Use wlr_damage_ringLibravatar Kirill Primak2022-11-11
| | | wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
* sway: Add non-desktop-output typeLibravatar Alex Maese2022-09-19
| | | | | | | | | | 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`
* Remove internal references to DPMSLibravatar Simon Ser2022-07-04
| | | | | While at it, use an int for the config field, just like we do for all other fields.
* output: change output::destroy to output::disableLibravatar Ronan Pigott2021-12-17
| | | | | This changes output::destroy to output::disable and emits it only once when an output is disabled, instead of twice in succession.
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* Remove support for arbitrary rotationsLibravatar Simon Ser2021-04-26
| | | | | | | 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.
* Rename output_layer_for_each_surface_{toplevel,popup}Libravatar Simon Ser2021-01-12
| | | | Swap the "surface" part for consistency with wlroots' naming.
* Switch to wlr_xdg_surface_for_each_popup_surfaceLibravatar Simon Ser2021-01-12
| | | | | | | | Instead of calling wlr_xdg_surface_for_each_popup and then wlr_surface_for_each_surface, use the new for_each_popup_surface helper introduced in [1] that does it in one go. [1]: https://github.com/swaywm/wlroots/pull/2609
* Use wlr_output_event_commitLibravatar Simon Ser2020-08-27
| | | | | | | | | | | | | Instead of listening to both transform and scale events, we can listen to the commit event and use the new wlr_output_event_commit struct to decide what to do. This de-duplicates some of the work we were doing twice when an output was re-configured. Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2315
* config/output: don't change output state before commitLibravatar Simon Ser2020-07-10
| | | | | | | | | | | | | | | | | | | | | | | Previously, we called output_disable prior to wlr_output_commit. This mutates Sway's output state before the output commit actually succeeds. This results in Sway's state getting out-of-sync with wlroots'. An alternative fix [1] was to revert the changes made by output_disable in case of failure. This is a little complicated. Instead, this patch makes it so Sway's internal state is never changed before a successful wlr_output commit. We had two output flags: enabled and configured. However enabled was set prior to the output becoming enabled, and was used to prevent the output event handlers (specifically, the mode handler) from calling apply_output_config again (infinite loop). Rename enabled to enabling and use it exclusively for this purpose. Rename configure to enabled, because that's what it really means. [1]: https://github.com/swaywm/sway/pull/5521 Closes: https://github.com/swaywm/sway/issues/5483
* Render layer shell popups over the top layerLibravatar David962020-04-10
|
* Drop sway_output.surface_needs_frameLibravatar Simon Ser2020-03-06
| | | | | | | wlr_output_schedule_frame now sets output->needs_frame [1], so this isn't needed anymore. [1]: https://github.com/swaywm/wlroots/pull/2053
* Make handle_destroy and output_repaint_timer_handler staticLibravatar Simon Ser2020-03-04
|
* Add support for wlr-output-power-management-unstable-v1Libravatar Simon Ser2020-02-26
|
* output: fix updating output manager configLibravatar Brian Ashworth2020-02-16
| | | | | | | | | | | | | | | | | | The output manager config is created when the output is created. It is updated when the mode, transform, scale, or layout for the output changes, as well as, when the output is destroyed. Since the output->enabled property was not being set before calling apply_output_config, the output event handlers were early returning and never updating the output manager config when the output state was committed. This fixes the issue by setting output->enabled in apply_output_config below the output disabling section. There are also a few other minor changes that are required to function. Additionally, this renames output_enable to output_configure to better describe the recent changes.
* Stop calling apply_output_config from output_enableLibravatar Simon Ser2020-02-11
| | | | | | | | | | | | | | | | The only output_enable caller is now apply_output_config. Stop calling apply_output_config from output_enable to simplify the code and avoid the back-and-forth between these two functions. output_enable is now the symmetric of output_disable: it just marks the output as enabled and performs bookkeeping (e.g. creating teh default workspace). It is called from apply_output_config after the output commit, so that it can read the current output state and act accordingly. This change also allows us to avoid an extraneous wlr_output_commit. References: https://github.com/swaywm/sway/issues/4921
* output: Schedule idle frames if we do not renderLibravatar Kenny Levinsen2019-12-01
| | | | | | | | | | | | | | | | | | | | Repaint scheduling delays output render and frame done events from output frame events, and block idle frame events from being scheduled in between output frame done and output render in this period of time. If a surface is committed after its frame done event, but before output render, idle frame requests will be blocked, and the surface relies on the upcoming render to schedule a frame. If when the repaint timer expires, output render is deemed unnecessary, no frame will be scheduled. This can lead to surfaces never having their frame callbacks fire. To fix this, we store that a surface has requested a frame in surface_needs_frame. When the repaint expires, if no render is deemed necessary, we check this flag and schedule an idle frame. Fixes #4768
* add scale_filter output config optionLibravatar Ronan Pigott2019-11-29
|
* view: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* output: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Fix segfault in wlr_output_manager_v1_set_configurationLibravatar Simon Ser2019-10-27
| | | | | | | | | | | | | | Calling wlr_output_manager_v1_set_configuration with an enabled output and a NULL mode is incorrect if the output doesn't support modes. When DPMS'ing an output, wlr_output_enable(output, false) is called. This de-allocates the CRTC and sets wlr_output.current_mode to NULL. Because we mark DPMS'ed outputs as enabled, we also need to provide a correct output mode. Add a field to sway_output to hold the current mode. Closes: https://github.com/swaywm/wlroots/issues/1867
* Fix apply_output_config return value when enabling outputLibravatar Simon Ser2019-10-27
| | | | | apply_output_config would call output_enable and always return true, even if the output couldn't be enabled.
* Remove all wayland-server.h includesLibravatar Simon Ser2019-07-27
| | | | | | | | | | | | | | | The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration. This commit si similar to wlroots' ca45f4490ccc ("Remove all wayland-server.h includes").
* Update output manager on layout changeLibravatar Josef Gajdusek2019-07-17
| | | | | The output manager config was not properly updated if the position of the output got changed.
* Implement wlr-output-management-v1Libravatar Josef Gajdusek2019-05-24
|
* Implement output toggleLibravatar Moelf2019-05-14
| | | | discussed in #4136, this can't handle wildcard but won't crash.
* swaybg: one instance for all outputsLibravatar Brian Ashworth2019-04-04
| | | | | | | | | This makes it so there will only be one swaybg instance running instead of one per output. swaybg's cli has been changed to a xrandr like interface, where you select an output and then change properties for that output and then select another output and repeat. This also makes it so swaybg is only killed and respawned when a background changes or when reloading.
* Add support for manually setting subpixel hinting on outputs.Libravatar Geoff Greer2019-03-24
| | | | | | Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this. Addresses https://github.com/swaywm/sway/issues/3163
* Fix output config retrieval for new outputsLibravatar Brian Ashworth2019-03-16
| | | | | | | | | | | | | | | | | | | This removes `output_find_config`, which would take the first matching output config it found. This is fine if only a name output config, identifier output config, or even just wildcard exist, but if there is a name output config and identifier output config, they are not merged. Instead, this introduces find_output_config, which is just a wrapper for `get_output_config`. This ensures that both the name and identifier output configs are respected. This fixes the following case: - For simplicity in this example, remove all output configs from config - Run `swaymsg output <name> bg #ff0000 solid_color` - Run `swaymsg output <identifier> scale 2` - Disconnect and reconnect output Without this, the output will have the background, but not the scale. With this, the output will have both the background and scale
* Stop using wlr_output->{lx,ly}Libravatar emersion2019-03-11
| | | | | Also fixes sway_output->{lx,ly,width,height} not being updated. Also fixes output_get_in_direction adding buffer coords to layout coords.