summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2025-01-26build: bump version to 1.10.11.10.1Simon Ser-1/+1
2025-01-26config/output: don't leak background_fallbackllyyr-0/+1
(cherry picked from commit 30c858423dcdfb82d768a5025b5f00c19b250322)
2025-01-26layer_shell: cleanup new_popup listener when destroying nodellyyr-0/+1
(cherry picked from commit 3629a832e5b3a73ccd4e42eca79943af121866da)
2025-01-26config/output: don't hardcode DMA-BUF in search_render_format()Simon Ser-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. (cherry picked from commit a6c0441ee060c7045b24aff943c7d0bf0f47412b)
2025-01-26config/output: skip format checks if all are supportedmtvare6-1/+2
Fixes #8496 (cherry picked from commit c7c0a5a1b36a5ac93baacdf0098e121817d0d642)
2025-01-26Explain that the title bar always showsHong Xu-3/+3
(cherry picked from commit 801bc76ce3ab2f620e30d1d0ad979caa5b03a164)
2025-01-26swaybar: Handle opaque region properlyAlexander Orzechowski-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. (cherry picked from commit f293418d9d8a9e71fc52bc75a83d24ec2cc934c9)
2024-11-28input/libinput: fix builtin device detection logicGyörgy Kurucz-2/+2
Fixes: #8468 (cherry picked from commit 1d783794b508e529bdc665296d690057c93997df)
2024-11-28ipc-json: handle LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKYSimon Ser-5/+8
New entry introduced in libinput 1.27.0. (cherry picked from commit e2409aa49611bee1e1b99033461bfab0a7550c48)
2024-11-28desktop/output: Clear repaint timer earlier in destroyKenny Levinsen-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: fdc4318ac66d ("desktop/output: Clear frame_pending even output is disabled") (cherry picked from commit 5312376077254d6431bb92ba22de3840b9933f67)
2024-11-28ipc-server: Force modeset if needed after executing commandsKenny Levinsen-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. (cherry picked from commit a2c73c9b8b426417e0253ea0420b98298af1c963)
2024-11-28config: Force modeset before running deferred configsKenny Levinsen-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 (cherry picked from commit 6111297d91faf5f2820acaa14d76d6389b469b77)
2024-11-28desktop/output: Clear frame_pending even output is disabledKenny Levinsen-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. (cherry picked from commit fdc4318ac66d257d21e8f3b953e341d5e80a1ddc)
2024-11-28desktop/output: Clean up output state if build_state failsKenny Levinsen-0/+1
wlr_scene_output_build_state can fail for various reasons. Ensure that the pending output state is cleaned up in that case. (cherry picked from commit 463c4c9369dc551c51c0888b411d49f8d9660a85)
2024-11-28swaybar: Emit property changes for SNI watcherJoan Bruguera Micó-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/03483ff3707a358d935e451d39748e58c205ce8a/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 (cherry picked from commit f23d10074739de31e9339796dc06348fd919c515)
2024-11-28swaynag: fix null dereference on scale changeManuel Stoeckl-1/+3
If cursor-shape-v1 is available, the old wl_cursor_theme path should not be used. (cherry picked from commit 03483ff3707a358d935e451d39748e58c205ce8a)
2024-11-28desktop/transaction: clamp vertical border length to 0mtvare6-2/+3
Fixes #8120 (cherry picked from commit 62fd8c4d011ea4dc360831723a3844c0e4439f32)
2024-11-28config/output: Update output position in two passesKenny Levinsen-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. (cherry picked from commit 78fa4e985618209a289f892dc54d67c83494a9d2)
2024-11-28container: Properly constrain title bar paddingAlexander Orzechowski-2/+2
Important for centered titles (cherry picked from commit 4cfcb3643bc2123c65c3748761d624c86df0002e)
2024-11-28release.sh: read meson-rewrite output from stdoutSimon Ser-1/+1
Since version 1.6, Meson now uses stdout: https://github.com/mesonbuild/meson/commit/3f4957c713f70d708f066fff119088040bb1d287 (cherry picked from commit d417a8fcd0a701395c2029adade261d19800f763)
2024-11-28desktop/output: Add missing output config allocation checksKenny Levinsen-2/+18
(cherry picked from commit f38719f575ab88e9d38bf4cfe3cb744071772bf2)
2024-11-28desktop/output: Store output config on request_stateKenny Levinsen-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 4f9ce4675cf4. 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: 4f9ce4675cf4 ("tree/arrange: Remove redundant output geometry update") (cherry picked from commit 1e53007bc33c1afa2c3ea580050f94f29c5ce8e4)
2024-10-27build: bump version to v1.101.10Simon Ser-1/+1
2024-10-20build: bump version to 1.10-rc41.10-rc4Simon Ser-1/+1
2024-10-20layer_shell: Restore sway 1.9 orderingAlexander Orzechowski-6/+7
(cherry picked from commit 8363699f145fca844772643ceedcdaa7c6b90982)
2024-10-20layer_shell: Arrange exclusive zone clients firstAlexander Orzechowski-5/+13
This makes layer_shell more stable against the order of clients. (cherry picked from commit ce6b2db0f2e9c71dda496d1aaaafcdcb9dade150)
2024-10-20trigger container update after disabling urgent in timerJan Palus-0/+1
switching workspace directly to urgent window creates timer which delays reset of urgent state so user is able to notice it. make sure state change is reflected visually as well (border change) by triggering container update Fixes: #8377 (cherry picked from commit db76fefd0c61d2c85f448eeb43ca3a97c10770a5)
2024-10-20config/output: Remove remaining logs from queue_output_configKenny Levinsen-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. (cherry picked from commit a63027245a6805bb952e47c5751ecdd7d1063d2f)
2024-10-20config/output: Remove initial values in find_output_configKenny Levinsen-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. (cherry picked from commit 17ecb9eb1d355c677dc9cf772d372982b7b9541b)
2024-10-20config/output: Always set all output fields on finalizeKenny Levinsen-29/+22
(cherry picked from commit af0d4a048a38847769fda4898a07a72401ee40be)
2024-10-20config/output: Always set output states from configKenny Levinsen-32/+21
queue_output_config had some remaining logic that would avoid setting output states if they already appeared to be in effect. That is not what most of the states did nor what is currently expected, so clean that up. (cherry picked from commit 7e0c0dda42183cf3f6a64bace230252cbeadbbd6)
2024-10-20config/output: Improve modeset state loggingKenny Levinsen-2/+8
Include scale and subpixel in the output state log, and log the output state on first commit attempt instead of just during fallback search. (cherry picked from commit 7d93652105c370518f1e5856f8586b2297cab772)
2024-10-13build: bump version to 1.10-rc31.10-rc3Simon Ser-1/+1
2024-10-13input/mouse: bugfix button2 being interpreted as trying to move the containerFurkan Sahin-1/+3
Man sway(5) specifies that when tiling_drag is enable, the floating_mod can be used to drag tiling, as well as floating containers. However the current code indiscriminately assumes any button press to be intended for moving the container, consequently causing an unintended call to `seatop_move_tilting:handle_button` rather than `seatop_default:handle_button` to pass `state=WL_POINTER_BUTTON_STATE_RELEASED` to `get_active_mouse_binding` My idea was to make 'Handle moving a tiling container' follow the same path as 'Handle moving a floating container' because the initial call to handle moving a floating correctly exits that branch and ends up passing the RELEASED state to `get_active_mouse_binding`. Fixes #8334 (cherry picked from commit 7f1cd0b73ba3290f8ee5f81fdf7f1ffa4c642ea7)
2024-10-13fix: sway crashes if switch to another workspace with surface when IME popup ↵ShootingStarDragons-0/+4
is shown in pr https://github.com/swaywm/sway/pull/8196, when im_popup_surface is unmapped, author set the popup->relative to NULL, butt popup is still in popup groups, where assert the relative is not NULL, this cause the panic Take the suggestion of Nefsen402, remove the line where set relative to NULL, and add NULL check in scene_descriptor_destory (cherry picked from commit f855b0898bf00285d5a7b840963b327230486632)
2024-10-06build: bump version to 1.10-rc21.10-rc2Simon Ser-1/+1
2024-10-06Re-init renderer for all outputs on lost contextKenny Levinsen-2/+2
sway_root.outputs only include enabled outputs. We also need to re-init the renderer for any disabled outputs, so use sway_root.all_outputs instead. Resolves the following heap-use-after-free accessing the render formats when a disabled output is modeset after a GPU reset has occurred. (cherry picked from commit c90cb37b2a0861548461daa9b75d75317e01b679)
2024-10-06Fix alpha-modifier-v1Alexander Orzechowski-0/+10
(cherry picked from commit 9a9be01ad4130e4e19b437fd064f90982974971f)
2024-10-06release: push tags before creating GitHub releaseSimon Ser-0/+1
Otherwise the GitHub release isn't attached to the Git tag. (cherry picked from commit a2757e5f165eae445ae550fd1d13f9ec0db44efc)
2024-09-29build: bump version to 1.10-rc11.10-rc1Simon Ser-1/+1
2024-09-29Add support for alpha-modifier-v1Simon Ser-0/+2
(cherry picked from commit a0b3606f1725ee56e8dc15ae51ce62d042c0668a)
2024-09-29swaybar: Fix 100% cpu usage if dbus dies.Furkan Sahin-5/+12
Currently, swaybar does not gracefully die if it detects that the dbus connection was lost. Although it's not recommended to restart dbus without restarting the compositor, it can very easily happen. In the case it does, compositor's tray should not consume 100% cpu until it has to be force killed. apply suggestions just setting the bar to not running will call teardown and unref the dbus. (cherry picked from commit 00e9a941523baa4afa1f9c077235aa7aa5e8aeab)
2024-09-29desktop/output: Clear modeset timer on output manager applyKenny Levinsen-0/+4
If a modeset timer exists at the time we apply an output manager config, clear it to avoid a useless double commit. (cherry picked from commit 63345977e2c411359a049c40cf2c1044a22b4f4a)
2024-09-29config: Batch input/output configuration on loadKenny Levinsen-16/+17
We batch modesets and input configuration performed during config reload but commit for every command during the intial config load. There is no need to perform commits during the initial config load as outputs have not yet been created, but swaybg spawn should still be batched. At the same time, replace direct calls to apply output configuration with request_modeset to properly handle the modeset timer. (cherry picked from commit cdff4f7c74b76e9141164b8c154621646140d8ec)
2024-09-29desktop/output: Expose request_modesetKenny Levinsen-10/+10
We remove the struct sway_server argument for consistency with the rest of our internal APIs which rely on the global server instance. (cherry picked from commit b73f54a966a30c2253818b89fefda16477531c14)
2024-09-29Removed destination-is-ancestor check from container_move_to_container to ↵Olivia Taliesin-1/+0
match i3 behaviour (cherry picked from commit b6da218974d2e0508e7816f707fe0b1f1c97f0d6)
2024-09-29commands/gaps: Check config->reading insteadKenny Levinsen-4/+2
Checking if the config is not active or is reloading is just a convoluted way of checking if the config is being read. (cherry picked from commit 861dde100ab5536bea190b078c6c51adb6814be5)
2024-09-21ext-session-lock: Do not use commit listener to arrangeKenny Levinsen-17/+20
Arranging lock surfaces rely on the sway_output width and height being updated, but these are only updated after the commit has been completed and all commit listeners have executed. This means that the lock surfaces will not be appropriately scaled to match a change in output dimensions, and may reveal what is under the lock background. Replace the implicit arrange through the output commit listener with an explicit arrange after the output configuration is finalized. This might have regressed by other transition away from output commit listeners for other arrange tasks, but even then it would have erroneously relied on signalling order. (cherry-picked from 785a459a55d8b55b4bed1fdc55b04c32be5b450c)
2024-09-21config/output: Rename to apply_stored_output_configsKenny Levinsen-5/+5
(cherry-picked from d7a76d381bbe4321578bc3a95fbc82d76b67ef05)
2024-09-21config/output: Accept a list of output_configs to useKenny Levinsen-75/+67
Instead of using a single finalized output config per output, accept a regular list of output configs like the one ultimately stored for configuration purposes. This allows the output management code to test an augmented configuration while still using the same output config logic, without having to mutate the stored configuration. This in turn allows us to make a few APIs private. A bug note about an existing issue with derade to off is added as well. (cherry picked from 29b3f00e6fd99296cde7e94b7063acfd075c559c)