Commit graph

7613 commits

Author SHA1 Message Date
bonsaiiV
b7eb6177e1
sway/commands/layout: fix flatten parent once
Fixes: f50e307227 ("sway/commands/layout: flatten parent once")
2025-10-18 18:55:46 +02:00
llyyr
90d3270970 sway/input/cursor: send frame event when simulating pointer from tablet 2025-10-05 19:46:53 +02:00
Louis POIROT--HATTERMANN
ecfea6b8ae commands/scratchpad: don't hide scratchpad if no pending workspace
Fixes: https://github.com/swaywm/sway/issues/8909
2025-10-05 19:22:48 +02:00
nyxed
b4a9a1716f build: switch to explicit 'meson setup' syntax 2025-10-02 18:06:20 +02:00
llyyr
d9e615c507 sway/server: set color_manager for root scene
Chase https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5122/
2025-09-23 23:50:15 +02:00
Felix Pehla
bc96d0acdf README: update German translation
Update the information about display manager support (see #8861), as
well as markdown formatting of links and change some wording in the
German README.
2025-09-18 11:18:07 +02:00
Simon Ser
a7d9535eb3 input/text_input: stop using listener data
These are now NULL.

Fixes: aaab7f961e ("input/text_input: chase wlroots update")
Closes: https://github.com/swaywm/sway/issues/8864
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5107
2025-09-15 07:41:51 +02:00
nortio
7c1e192ea3
Update README.it.md for Italian
Updated italian readme to follow the recent changes to the English one.
I also removed "gestore di accesso" which in theory translates to
display manager, but in practice is never used in this context. Other
wikis such as [Debian](https://wiki.debian.org/it/DisplayManager) and
[Ubuntu](https://wiki.ubuntu-it.org/AmbienteGrafico/DisplayManager) just
use the term "Display Manager" as is. Another small thing that I
corrected is "canale di IRC" which sounds a bit weird.
2025-09-14 19:38:17 +02:00
aceydot
50a8750e01
Add Serbian README 2025-09-12 19:55:36 +02:00
Martin Dørum
a41b25020d
Update Norwegian README to make it more in line with the English one, as well as improving grammar 2025-09-12 15:43:30 +02:00
Kirill Chibisov
35b69158d7 readme: sync Japanese translation 2025-09-12 15:28:31 +02:00
Kirill Chibisov
862e9b8c20 readme: sync Russian translation 2025-09-12 15:28:31 +02:00
Oto Šťáva
68ac52ffc2 readme: Update and reword Czech translation 2025-09-11 23:48:16 +02:00
Przemysław Gasiński
e6fc3ffa3f readme: Update Polish translation regarding the support of display managers 2025-09-11 23:46:57 +02:00
Martin Dørum
70c51c44f6 update danish readme to reflect that display managers are supported 2025-09-11 17:20:07 +02:00
Simon Ser
ca45c22376 readme: mark display managers as supported
It's been a long while since we've heard about issues related to
display managers. Some used to be unreliable in the past, but by
now most issues have been ironed out. Let's start supporting them
officially.

I've considered translating other languages but I'm concerned about
messing up the sentence. I've updated languages I'm comfortable
with.
2025-09-11 14:14:51 +00:00
Nikola Kocic
c5456be750 xdg-shell: fix reported WM capabilities
Previously it was reporting window_menu and maximize instead of fullscreen because wlr_xdg_toplevel_set_wm_capabilities expects a bitmask (WLR_XDG_TOPLEVEL_WM_CAPABILITIES_*), and XDG_TOPLEVEL_WM_CAPABILITIES_* are supposed to be used as values in wl_array, so the values are different:
XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 3
WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 4
2025-09-09 13:55:46 +02:00
Bill Li
aaab7f961e input/text_input: chase wlroots update
References:https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5107
2025-09-08 15:54:59 +00:00
Kenny Levinsen
73c244fb48 config/output: Only error when enabling HDR
We currently emit errors about HDR support even if HDR is not being
requested, which mean errors on every regular modeset when monitors not
supporting HDR are connected.

Only emit errors when attempting to enable HDR on such device.
2025-08-22 15:49:09 +02:00
Simon Ser
b3dcde8d69 Stop generating wayland-protocols server headers
We still need to generate wlr-protocols server headers, as well as
client headers and code.

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5075
2025-08-14 10:09:59 +02:00
Joaquim Monteiro
0770a8d643 Add wl_fixes interface 2025-08-13 22:58:21 +02:00
Tim Hallmann
340505bb6f commands/resize: make resize consider all siblings
Fixes a compatibility issue with i3 where resizing works as described
hereafter:
> Direction can either be one of up, down, left or right. Or you can be
> less specific and use width or height, in which case i3 will take/give
> space from all the other containers.

Sway previously considered only the direct neighbours, not all siblings.

Fixes #5936
2025-08-03 20:15:39 +02:00
bonsaiiV
f50e307227
sway/commands/layout: flatten parent once
Applying layout changes to the parent of the parent, in case the parent only has a single child, stops the creation of a chain of single child containers.

Closes: https://github.com/swaywm/sway/issues/7945
2025-08-03 15:25:40 +02:00
Tomasz Buczyński
87fbcf0574 Add cursor->hidden check to handle_rebase
Fixes #6245
2025-08-03 15:01:21 +02:00
Kenny Levinsen
357d341f8f tree/node: Do not mark destroying nodes as dirty
Node destruction currently runs through the transaction system such that
a particular node is only destroyed after its use in an ongoing
transaction. If a node is dirtied after the node is marked as destroying
but before it is destroyed, the pointer added to dirty_nodes would
become a dangling pointer once the node was destroyed.

Do not dirty destroying nodes, and ensure that destroying is only set
after the last dirty.
2025-07-31 15:57:28 +02:00
Simon Ser
14fbe9242f Revert drag_lock default to disabled
I misunderstood the recommendation in the libinput release notes.
Instead of making enabled_sticky the default, leave the default
set to disabled.

Fixes: bbadf9b8b1 ("Add support for LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY")
Closes: https://github.com/swaywm/sway/issues/8758
2025-07-29 09:41:19 +02:00
Fenveireth
e50b16a699 tree/view: save new wlr_scene_buffer fields
Visble flicker can occur during transactions, if these are not copied
to the 'saved' scene
2025-07-20 15:16:03 +02:00
Simon Ser
cb33701f5e Add xdg_toplevel tag to criteria 2025-07-16 10:03:09 +02:00
Simon Ser
08142c3f3a Add xdg_toplevel tag to IPC 2025-07-16 10:03:09 +02:00
Simon Ser
3826535ab0 Wire up xdg-toplevel-tag-v1 2025-07-16 10:03:09 +02:00
Nuran Askarov
f57c82a6f7 Add link to README.az.md 2025-07-09 16:57:14 +02:00
Nuran Askarov
8d7c756276 Add README.az.md 2025-07-09 16:57:14 +02:00
Simon Ser
94c819cc1f Add features.hdr to output IPC response 2025-07-09 01:25:11 +02:00
Simon Ser
6fed1f9d89 Add support for color-management-v1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4962
2025-07-09 01:25:11 +02:00
Simon Ser
bac8c0f4d0 Add support for HDR10 output 2025-07-09 01:25:11 +02:00
Simon Ser
c7d7d56f61 ipc-json, swaymsg: indicate when adaptive sync is unsupported 2025-07-08 15:58:53 +02:00
Simon Ser
a1ac2a2e93 Drop sway_output.events.disable
In general wl_signal isn't well-suited for Sway: Sway doesn't need
any modularity, and signals make it trickier to track down exactly
what happens down the stack.

Replace Sway's output disable signal with a simple list tracking
for the only user.
2025-07-02 21:21:53 +02:00
Kenny Levinsen
56f2db062d Revert "sway/tree: Simplify sway_node teardown"
This reverts commit e28e6484e8.

This change tried to remove nodes from all points of reference to allow
immediate destruction. However, it missed things like the children lists
cloned by transaction states of parent nodes.

Adding all that extra cleanup would not be in the spirit of a PR
claiming to simplify teardown. Let's wait for someone to come up with a
cleaner approach instead.

Fixes: https://github.com/swaywm/sway/pull/8738
2025-06-28 11:26:49 +02:00
Kenny Levinsen
0cd45d4ad2 Revert "tree/container: Remove child from all lists"
This reverts commit 3d6b9a2848.
2025-06-28 11:26:49 +02:00
Kenny Levinsen
3d6b9a2848 tree/container: Remove child from all lists
When a container is detached, we need to remove it from any lists it may
be part of. We use container_get_siblings to obtain the relevant list,
find our entry and remove it.

If the container is in a later list than the one returned by
container_get_siblings, or is in multiple lists for some reason,
container_detach will fail to remove the container, leaving a dangling
pointer when the container is freed.

Instead of calling container_get_siblings, check and remove the
container from all lists.
2025-06-26 22:05:05 +02:00
Kenny Levinsen
e28e6484e8 sway/tree: Simplify sway_node teardown
A sway_node may end up being referenced in either a queued transaction,
pending transaction or as a dirty node. To manage this, the transaction
system has been responsible for destroying containers, workspaces and
outputs at the end of their last referenced transaction.

This significantly complicates the teardown flow of surfaces and
outputs. Instead, remove the node from transactions and dirty lists so
that the callsite can remove and free the node immediately.
2025-06-26 22:05:05 +02:00
Kenny Levinsen
4f59eeef05 Remove the temporary SUID warning
A temporary SUID detection that would cause sway to exit was introduced
when SUID operation was deprecated, intended to avoid cases where a user
would not heed the deprecation notice, continued to use SUID and ended
up with sway accidentally running as root.

Remove the check, as the three years that have passed is sufficient time
for users to discover the deprecation and adapt. We did not care if
users intentionally want to run sway as root through SUID, we only
wanted to avoid surprise root.
2025-06-26 22:00:05 +02:00
Simon Ser
c2f08075ec tree/view: send event unconditionally in view_send_frame_done()
Previously, we were using wl_signal_emit_mutable() directly instead
of wlr_scene_buffer_send_frame_done(). This bypassed any visibility
checks, which matters before a surface is mapped.

Fixes flickering with an invalid size when launching new programs.

Fixes: eb8acfd7b1 ("Stop using wlr_scene_buffer_send_frame_done()")
2025-06-23 10:32:31 +02:00
Simon Ser
170c9c9525 Add support for toplevel capture
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5078
2025-06-16 14:28:20 +02:00
Simon Ser
eb8acfd7b1 Stop using wlr_scene_buffer_send_frame_done()
That function now takes the output as input. We don't always have
the output at hand, so use the function operating on a
wlr_scene_surface instead.
2025-06-16 14:28:20 +02:00
hwsmm
25ea1a0af2 seatop_default: Call seatop_rebase with proper timestamp 2025-06-16 11:26:26 +02:00
hwsmm
4b15b3427f Rename get_current_time_msec to get_current_time_in_msec and move to util.c
get_current_time_msec conflicts with a function with the same name in wlroots.
2025-06-16 11:26:26 +02:00
Simon Ser
17f7c1b782 build: set wrap_mode=nodownload in default options
This can be surprising (e.g. in CI, this can download source code
instead of using system libraries) and users can easily turn it
back on if desired.
2025-06-16 09:31:15 +02:00
Attila Fidan
6c27c2cdf2 text_input: Don't relay IM state from unfocused windows
Otherwise, applications can enable their text input and affect IM state
while a different application is focused.
2025-06-14 09:19:17 +02:00
Attila Fidan
1ab573bf54 text_input: Ignore enable requests from unfocused windows
Unfocused windows shouldn't be allowed to activate the IM.

This fixes an issue with swaymsg invocations that contain several
commands which result in multiple swift focus changes. An application
briefly gets text input focus, sends an enable request, then sway
processes it and activates the IM only after the commands are all
finished and focus is on something else which did not send an enable
request.
2025-06-14 09:19:17 +02:00