Age | Commit message (Collapse) | Author |
|
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
|
|
|
|
|
|
|
|
|
|
We want to create a context before knowing the pid it will match with.
|
|
|
|
Soon we will match views with more than just a pid.
|
|
This removes the pid_workspace bits from tree/root before it gets
too interesting.
No functional change.
|
|
Wayland compositors handle many file descriptors: client
connections, DMA-BUFs, sync_files, wl_data_device pipes, and so
on. Bump the limit to the max.
Closes: https://github.com/swaywm/sway/issues/6285
|
|
Sway ignores SIGPIPE (by installing a SIG_IGN handler), in order to
“prevent IPC from crashing Sway”.
SIG_IGN handlers are the *only* signal handlers inherited in
sub-processes. As such, we should be a good citizen and restore
the SIGPIPE handler to its default handler.
Original bug report:
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1806907.html
|
|
|
|
And exit(1) instead of indicating success.
|
|
This stops assuming the POSIX shell command is located in /bin.
|
|
Split cmd_exec_always into separate methods for general validation and
process creation. This fixes a potential call of join_args with 0 arguments.
|
|
This commit mostly duplicates the wlr_log functions, although
with a sway_* prefix. (This is very similar to PR #2009.)
However, the logging function no longer needs to be replaceable,
so sway_log_init's second argument is used to set the exit
callback for sway_abort.
wlr_log_init is still invoked in sway/main.c
This commit makes it easier to remove the wlroots dependency for
the helper programs swaymsg, swaybg, swaybar, and swaynag.
|
|
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))`
applied to `cmd_results_new`.
String usage constants have been converted from pointers to arrays when
encountered. General handler format strings were sometimes modified to
include the old input string, especially for unknown command errors.
|
|
And make sure we don't define both in the same source file.
|
|
The exec_always command was executed twice, since it was not checking for the
config->validating variable.
Fix this by defering the command if the configuration is validating.
Fixes #3072
|
|
Its uses have been replaced with EXPECTED_AT_LEAST.
|
|
|
|
|
|
When we have type safety we'll need to have functions for
workspace_add_tiling and so on. This means the existing container
functions will be just for containers, so they are being moved to
container.c. At this point layout.c doesn't contain much else, so I've
relocated everything and removed the file.
* container_swap and its static functions have been moved to the swap
command and made static.
* container_recursive_resize has been moved to the resize command and
made static.
* The following have been moved to container.c:
* container_handle_fullscreen_reparent
* container_insert_child
* container_add_sibling
* container_add_child
* container_remove_child
* container_replace_child
* container_split
* enum movement_direction and sway_dir_to_wlr have been moved to util.c.
Side note: Several commands included layout.h which then included
root.h. With layout.h gone, root.h has to be included by those commands.
|
|
|
|
|
|
wlroots uses wl_event_loop_add_signal to handle SIGUSR1 from Xwayland.
wl_event_loop_add_signal works by masking the signal and receiving it from a
signalfd. The signal mask is preserved across fork and exec, so subprocesses
spawned by Sway start with SIGUSR1 masked. Most subprocesses do not expect this
and never unmask the signal, resulting in missing functionality or unexpected
behavior for processes that use SIGUSR1 (such as i3status).
Fix this by unmasking all signals between fork and exec.
|
|
|
|
|
|
- child would leak in the workspace_record_pid path
- removing malloc lets us get rid of That Comment nobody seems
to remember what it was about
- we would leak pipe fds on first fork failling
- we didn't return an error if second fork failed
- the final executed process still had both pipe fds
(would show up in /proc/23560/fd in launched programs)
- we would write twice to the pipe if execl failed for some reason
(e.g. if /bin/sh doesn't exist?!)
|
|
When you spawn a process with the exec command, sway now notes the
workspace you had focused and the pid of the child process, then assigns
that workspace to the child when its window appears.
Some of this is carried over from sway 0.15, but with some major
refactoring and centralization of state.
|
|
|
|
This reverts commit 7709340727fe2834f87b43aeeaef878694d5acd6.
|
|
This reverts commit 1670b46bf6e56d37e69ab0fa32c6799e83397020.
|
|
This reverts commit 830c4ef74c00dbe448da46cdbc576178abc5728e.
|
|
process"
This reverts commit 177c67e6b89404d9d477b82c00c1353cd4696096.
|
|
|
|
|
|
Derive a value from it, called `rundir` rather than writing join_paths(libexecdir,
'sway') all over the place.
|
|
|
|
|
|
|
|
This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing
changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|