aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2025-02-18output: Allow configuring scene without an outputFurkan Sahin-1/+3
2025-02-18output: Expose output_configure_scene to headerFurkan Sahin-1/+4
2025-02-16docs: use "window" instead of "view" throughout.Furkan Sahin-65/+65
"view" is an internal term, while the commonly understood user-facing term is "window" Ref: #7323
2025-02-16sway/ipc-json: add ext-foreign-toplevel-handle identifier to get_tree ipc outputFurkan Sahin-0/+12
Fixes #8291
2025-02-03output/background: fix config ignoring fallback colorFurkan Sahin-44/+38
currently, the output background command handler prematurely returns with an error if the background file cannot be accessed. It should only error if user did not provide fallback color. closes #8556 Changes - Introduce variables to avoid uneccessary writing on output members - Log a debug message when fallback is being used over inaccessible file - Always parse the background color and swaynag warn if it is incorrect - when updating output member variables, free previous values - add cleanup label and goto it if `strdup` fails - Move output->member initializations to before parsing fallback, Also free and init output->background as well
2025-02-07man: Document bar mode toggle commandFurkan Sahin-0/+6
Functionality for switching swaybar's current mode between hidden and docked currently exists, but is absent from the relevant manpage.
2025-01-27input/cursor: remove tool_proximity listener in destroyFurkan Sahin-0/+1
2025-01-27Drop wlr_matrix.h include from sway/desktop/output.cFurkan Sahin-1/+0
wlr_matrix is now private API. Fixes #8549
2024-02-12Add ext-image-copy-capture-v1 and ext-image-capture-source-v1Furkan Sahin-3/+12
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4545
2025-01-16config/output: don't leak background_fallbackFurkan Sahin-0/+1
2025-01-04swaymsg: pretty-print sandbox propertiesFurkan Sahin-0/+12
2024-12-27tree/container: support sandbox properties in title formatFurkan Sahin-6/+32
2022-08-07criteria: add sandbox propertiesFurkan Sahin-1/+104
2022-09-26ipc-json: add sandbox properties to view JSONFurkan Sahin-0/+22
2024-12-26tree/view: add getters for sandbox propertiesFurkan Sahin-0/+35
2025-01-11Increase max default buffer size to 1 MiBFurkan Sahin-0/+1
Increasing the max default buffer size prevents clients from crashing when they need more than 4096 bytes. This can happen when the GUI thread of the application is blocked, especially when moving your mouse over it with high mouse sensitivity.
2025-01-11layer_shell: cleanup new_popup listener when destroying nodeFurkan Sahin-0/+1
2025-01-08config/output: don't hardcode DMA-BUF in search_render_format()Furkan Sahin-1/+2
We could be running with a backend which doesn't support DMA-BUFs, e.g. inside a parent Wayland compositor without GPU acceleration.
2025-01-08config/output: skip format checks if all are supportedFurkan Sahin-1/+2
Fixes #8496
2025-01-07Fix has_prefix() comparisons with 0Furkan Sahin-2/+2
has_prefix() returns a bool, unlike strncmp() which returns an int. Fixes: 86d128b708d7 ("Use has_prefix() instead of strncmp() throughout") Closes: https://github.com/swaywm/sway/issues/8527
2025-01-07Use has_prefix() instead of strncmp() throughoutFurkan Sahin-49/+44
This is safer than hardcoded string lengths.
2025-01-07stringop: move over has_prefix()Furkan Sahin-4/+6
2024-12-16Explain that the title bar always showsFurkan Sahin-3/+3
2024-12-08swaybar: Handle opaque region properlyFurkan Sahin-6/+11
The background color can be set individually for the different elements of the bar. If any of the backgrounds have transparency, we have to bail out from advertising an opaque surface.
2024-12-08input/libinput: fix parsing input drag_lock commandFurkan Sahin-1/+1
Regression introduced by by b160fac9f7a
2024-11-20input/libinput: fix builtin device detection logicFurkan Sahin-2/+2
Fixes: #8468
2024-11-22tree/container: remove output_{enter,leave} listeners in destroyFurkan Sahin-0/+2
https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/0d6cc471e95c1632b234fc9152659d24fe5982f1 added an assert that all signals are clear when destroying a wlr_scene_buffer, which is currently triggering due to sway not removing the output_enter and output_leave listeners on the container before calling wlr_scene_node_destroy on output_handler. Remove the listeners before wlr_scene_node_destroy is called.
2024-11-20Add support for LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKYFurkan Sahin-3/+18
Use it as the default, as recommended by the libinput release notes: https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
2024-11-20ipc-json: handle LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKYFurkan Sahin-5/+8
New entry introduced in libinput 1.27.0.
2024-11-17desktop/output: Clear repaint timer earlier in destroyFurkan Sahin-1/+3
The teardown of a sway_output is split in two: begin_destroy and output_destroy. The former clears some state such as NULL'ing the reference to wlr_output, while the latter frees the struct and its remaining resources. If an output is destroyed while a repaint timer is pending, future frame callbacks will no longer occur as the listener is torn down in begin_destroy, but the repaint timer is not torn down and may still fire until output_destroy is hit. As begin_destroy cleared the reference to wlr_output, this leads to a NULL-pointer dereference. Tear down the repaint timer in begin_destroy as there is no need for it. Fixes: bfa1dc8e5ad0 ("desktop/output: Clear frame_pending even output is disabled")
2024-11-13commands/include: handle many files in single lineFurkan Sahin-5/+5
i3 supports including multiple files in a single line, whereas sway limits to single file per line.
2024-11-17ipc-server: Force modeset if needed after executing commandsFurkan Sahin-0/+11
IPC clients generally expect executed commands to have taken effect when the command completes, while delayed modeset means that it can take several milliseconds more before e.g. an output is enabled. However, modesetting on every output command in the IPC call could on systems with already slow modesetting behavior lead to an unresponsive system for a not insignificant period of time. To strike a balance, force modeset once all the commands of this IPC call have executed if a modeset is pending.
2024-11-11config: Force modeset before running deferred configsFurkan Sahin-5/+11
Some commands require outputs to be enabled. These commands are deferred to allow outputs to be discovered, but the delayed modeset might only run some time later. Force a modeset to occur before running deferred commands. Fixes: https://github.com/swaywm/sway/issues/8433
2024-11-16Fix orthographic mistakes in Hungarian READMEFurkan Sahin-7/+7
Fix a few mistakes so the text conforms to Hungarian orthography. The following rules were applied (the whole linked page is in Hungarian): - <https://www.helyesiras.mta.hu/helyesiras/default/akh12#110> - <https://www.helyesiras.mta.hu/helyesiras/default/akh12#112> - <https://www.helyesiras.mta.hu/helyesiras/default/akh12#113> - <https://www.helyesiras.mta.hu/helyesiras/default/akh12#215> - <https://www.helyesiras.mta.hu/helyesiras/default/akh12#244>
2024-11-11desktop/output: Clear frame_pending even output is disabledFurkan Sahin-2/+1
frame_pending should always be cleared once the repaint callback is fired to ensure that future frame scheduling is not accidentally held back.
2024-11-11desktop/output: Clean up output state if build_state failsFurkan Sahin-0/+1
wlr_scene_output_build_state can fail for various reasons. Ensure that the pending output state is cleaned up in that case.
2024-11-10swaybar: Emit property changes for SNI watcherFurkan Sahin-0/+12
Emit property change signals for the IsStatusNotifierHostRegistered and RegisteredStatusNotifierItems properties in StatusNotifierWatcher, so code relying on the PropertiesChanged signal, instead of signals such as StatusNotifierHostRegistered, can work properly. A library that is affected by this is the libappindicator-gtk3* library and it can cause tray icons to be missing after starting swaybar due to a race condition, as follows: * An application using libappindicator-gtk3 starts, e.g. nm-applet. * Some time later, swaybar starts. * swaybar creates the StatusNotifierWatcher. * libappindicator-gtk3 observes the new watcher, but it sees that IsStatusNotifierHostRegistered=false, so it falls back to the Freedesktop System tray protocol. * swaybar creates the StatusNotifierHost. At this point, libappindicator-gtk3 should "un-fallback" back to SNI. However, since swaybar does not emit the PropertiesChange signal on IsStatusNotifierHostRegistered, libappindicator-gtk3 doesn't get notified, and stays in fallback state forever. * As a result, nm-applet will not show in the swaybar tray. This race can be made reliable by inserting a 1-second long sleep here: https://github.com/swaywm/sway/blob/969b11b8a79093d591f67491f7b90ab197dc2b8d/swaybar/tray/tray.c#L57 (*) Note that the libappindicator-gtk3 library has been mostly replaced by libayatana-appindicator, which is not affected by this. The affected version is still used by Arch Linux, source code at: https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk/files/298
2024-11-08swaynag: fix null dereference on scale changeFurkan Sahin-1/+3
If cursor-shape-v1 is available, the old wl_cursor_theme path should not be used.
2024-10-29desktop/transaction: clamp vertical border length to 0Furkan Sahin-2/+3
Fixes #8120
2024-11-05config/output: Update output position in two passesFurkan Sahin-8/+16
The modeset logic iterates over all outputs at the end, sets their new position in the layout and takes a copy of its geometry that is later referenced by layout and scene management code. If one output is auto configured, then a later output that is manually configured can lead to the first output being moved without the stored geometry being updated. Split this into two passes: The first pass finalizes the output config and makes updates to the layout, while the second pass updates the copy of the geometry and arranges things as a result of it.
2024-11-03container: Properly constrain title bar paddingFurkan Sahin-2/+2
Important for centered titles
2024-10-27release.sh: read meson-rewrite output from stdoutFurkan Sahin-1/+1
Since version 1.6, Meson now uses stdout: https://github.com/mesonbuild/meson/commit/3f4957c713f70d708f066fff119088040bb1d287
2024-10-28desktop/output: Add missing output config allocation checksFurkan Sahin-2/+18
2024-10-28desktop/output: Store output config on request_stateFurkan Sahin-10/+38
An output backend might request any change to an output state at any time, although currently only this is currently only used for changing window size on the wayland and x11 backend. Applying the configuration directly means that the current output state becomes inconsistent with the configured state, which can cause the new state to be reverted later if apply_stored_output_configs is called. Before 3a85bd68bc15. the output geometry would be updated by arrange_outputs, but this is only done by the modeset logic now, resulting in the stored geometry never being updated on wayland backend window resize. This was not discovered as the stored geometry is not used particularly often. Solve both by storing a new output configuration and relying on the modeset logic to apply a new state. Fixes: 3a85bd68bc15 ("tree/arrange: Remove redundant output geometry update")
2024-10-28Remove language bars from remaining non-English README filesFurkan Sahin-4/+0
2024-10-15sway/server: bind to presentation-time-v2Furkan Sahin-1/+2
Depends on: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4858
2024-10-25desktop/output: chase wlroots private fields updateFurkan Sahin-2/+2
This will be replaced with a proper solution later.
2024-10-17config/output: Remove remaining logs from queue_output_configFurkan Sahin-15/+1
The job of queue_output_config is now just to fill out a wlr_output_state according to the output configuration, but it still has a lot of logging from before we had wlr_output_state or the new modeset logic, when queue_output_state instead touched the implicit pending state of wlr_output. Whatever debug logs it had would already be covered by the output state debug logs or the command debug logs, so let's just remove it.
2024-10-17config/output: Remove initial values in find_output_configFurkan Sahin-9/+0
Starting by setting some special initial output config values settings was something sway used to do when the config was initially being processed. This was later changed to always happen, as there shouldn't be differences in how output config is calculated during config load and after. Most of these values are redundant, as they are either the zero value or a value that would be selected if the unset (-1) value was found. For output transforms, the automatic panel orientation code would only trigger if the final output config has an unset transform, which the initial values set in find_output_config made impossible. Remove these initial values and instead use a fresh output config as is.
2024-10-17config/output: Always set all output fields on finalizeFurkan Sahin-29/+22