i3-compatible Wayland compositor
Find a file
llyyr 0c2079415d sway/desktop/transaction: null check node before accessing node
It's possible for this to be null when powering on display from a
powered off state.

```
==1947040==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ce3d56a7c60 at pc 0x00000048d0c4 bp 0x7ffc25f0a5b0 sp 0x7ffc25f0a5a8
READ of size 8 at 0x7ce3d56a7c60 thread T0
    #0 0x00000048d0c3 in transaction_add_node ../sway/desktop/transaction.c:174
    #1 0x00000048d0c3 in _transaction_commit_dirty ../sway/desktop/transaction.c:955
    #2 0x00000048d0c3 in _transaction_commit_dirty ../sway/desktop/transaction.c:941
    #3 0x000000522581 in apply_resolved_output_configs ../sway/config/output.c:1022
    #4 0x000000522581 in apply_output_configs ../sway/config/output.c:1070
    #5 0x00000047445f in timer_modeset_handle ../sway/desktop/output.c:407
    #6 0x7fa3d8b1e4bc in wl_timer_heap_dispatch ../src/event-loop.c:529
    #7 0x7fa3d8b1e4bc in wl_event_loop_dispatch ../src/event-loop.c:1052
    #8 0x7fa3d8b200b4 in wl_display_run ../src/wayland-server.c:1584
    #9 0x00000041fc45 in main ../sway/main.c:376
    #10 0x7fa3d702b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #11 0x7fa3d702b3ca in __libc_start_main_impl (/lib64/libc.so.6+0x2b3ca) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #12 0x000000421cb4 in _start ../sysdeps/x86_64/start.S:115
0x7ce3d56a7c60 is located 32 bytes inside of 424-byte region [0x7ce3d56a7c40,0x7ce3d56a7de8)
freed by thread T0 here:
    #0 0x7fa3d93208eb  (/lib64/libasan.so.8+0x1208eb) (BuildId: cbfe49f3b7600c4f194d4c54774c977296e9d98a)
    #1 0x00000048701f in transaction_destroy ../sway/desktop/transaction.c:68
    #2 0x00000048701f in transaction_progress ../sway/desktop/transaction.c:766
    #3 0x000000487185 in transaction_commit_pending ../sway/desktop/transaction.c:884
    #4 0x000000487185 in transaction_commit_pending ../sway/desktop/transaction.c:876
    #5 0x000000487185 in transaction_progress ../sway/desktop/transaction.c:774
    #6 0x00000048ba69 in handle_timeout ../sway/desktop/transaction.c:782
    #7 0x7fa3d8b1e4bc in wl_timer_heap_dispatch ../src/event-loop.c:529
    #8 0x7fa3d8b1e4bc in wl_event_loop_dispatch ../src/event-loop.c:1052
previously allocated by thread T0 here:
    #0 0x7fa3d93215a3 in calloc (/lib64/libasan.so.8+0x1215a3) (BuildId: cbfe49f3b7600c4f194d4c54774c977296e9d98a)
    #1 0x0000005ed71c in output_create ../sway/tree/output.c:105
    #2 0x00000047bfa4 in handle_new_output ../sway/desktop/output.c:572
    #3 0x7fa3d8b1c73b in wl_signal_emit_mutable ../src/wayland-server.c:2369
    #4 0x7ffc25f0a63f  ([stack]+0x2963f)
SUMMARY: AddressSanitizer: heap-use-after-free ../sway/desktop/transaction.c:174 in transaction_add_node
```
2025-12-14 00:19:35 +05:30
.builds build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
.github/ISSUE_TEMPLATE github: don't truncate debug logs 2021-10-17 21:28:51 +02:00
assets License wallpapers as CC-0 2019-12-16 14:35:58 -05:00
client Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
common Rename get_current_time_msec to get_current_time_in_msec and move to util.c 2025-06-16 11:26:26 +02:00
completions build: move completions to separate file 2022-11-28 18:51:45 -05:00
include Add xdg_toplevel tag to criteria 2025-07-16 10:03:09 +02:00
protocols Drop org_kde_kwin_idle files 2025-11-28 09:26:17 +01:00
sway sway/desktop/transaction: null check node before accessing node 2025-12-14 00:19:35 +05:30
swaybar swaybar: deduplicate mode and workspace rendering code 2025-05-25 14:48:14 +02:00
swaymsg Add features.hdr to output IPC response 2025-07-09 01:25:11 +02:00
swaynag swaynag/main: free config_path 2025-11-20 12:31:30 +01:00
.editorconfig Create .editorconfig 2016-07-04 14:12:32 +02:00
.gitignore gitignore: Ignore clangd-generated directory .cache/ 2023-10-23 11:05:08 +02:00
.mailmap Add a .mailmap file 2023-03-26 23:22:30 +02:00
config.in config.in: bind XF86Audio* keycodes to playerctl 2025-06-09 15:56:41 +02:00
CONTRIBUTING.md Fix IRC links in READMEs and templates 2021-05-26 08:25:13 +02:00
LICENSE MIT license 2017-01-06 13:45:48 -05:00
meson.build Add support for color-management-v1 2025-07-09 01:25:11 +02:00
meson_options.txt build: drop xwayland option 2024-05-21 11:44:39 -04:00
README.ar.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.az.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.cs.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.de.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.dk.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.es.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.fr.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ge.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.gr.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.hi.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.hu.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ir.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.it.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ja.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ko.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.nl.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.no.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.pl.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.pt.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ro.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.ru.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.sr.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.sv.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.tr.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.uk.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.zh-CN.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
README.zh-TW.md build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
release.sh release.sh: read meson-rewrite output from stdout 2024-10-31 10:31:38 +01:00
sway.desktop Add the DesktopNames key to the sway.desktop session file 2025-03-08 12:56:03 +01:00

sway

English - عربي - Azərbaycanca - Česky - Deutsch - Dansk - Español - Français - ქართული - Ελληνικά - हिन्दी - Magyar - فارسی - Italiano - 日本語 - 한국어 - Nederlands - Norsk - Polski - Português - Română - Русский - Српски - Svenska - Türkçe - Українська - 中文-简体 - 中文-繁體

sway is an i3-compatible Wayland compositor. Read the FAQ. Join the IRC channel (#sway on irc.libera.chat).

Release Signatures

Releases are signed with E88F5E48 and published on GitHub.

Installation

From Packages

Sway is available in many distributions. Try installing the "sway" package for yours.

Compiling from Source

Check out this wiki page if you want to build the HEAD of sway and wlroots for testing or development.

Install dependencies:

  • meson *
  • wlroots
  • wayland
  • wayland-protocols *
  • pcre2
  • json-c
  • pango
  • cairo
  • gdk-pixbuf2 (optional: additional image formats for system tray)
  • swaybg (optional: wallpaper)
  • scdoc (optional: man pages) *
  • git (optional: version info) *

* Compile-time dep

Run these commands:

meson setup build/
ninja -C build/
sudo ninja -C build/ install

Configuration

If you already use i3, then copy your i3 config to ~/.config/sway/config and it'll work out of the box. Otherwise, copy the sample configuration file to ~/.config/sway/config. It is usually located at /etc/sway/config. Run man 5 sway for information on the configuration.

Running

Run sway from a TTY or from a display manager.