Currently, when encountering a non-desktop display, sway offers the
output for leasing and returns without storing it in a sway specific
output type like `struct sway_output`. Additionally, running
`swaymsg -t get_outputs` doesn't show non-desktop outputs.
This commit stores the non-desktop outputs into a struct called
`sway_output_non_desktop`, and adds them to a list on `sway_root`
Without this, the `IPC_GET_TREE` ipc call would return false information
about the container's `deco_rect` and `rect` properties if
`hide_edge_borders --i3` was in effect.
This semi-colon looks like a typo. Luckily, it has no effect on the code as it's treated as an empty statement leading the switch case.
Really straightforward nitpick change, was just something I was confused by when reading over the code.
Use pango to parse font configuration early, and reject the command as
invalid if the value is invalid for pango. Since we're already parsing
the font into a `PangoFontDescription`, keep that instance around and
avoid re-parsing the font each time we render text.
Fixes: https://github.com/swaywm/sway/issues/6805
If the input device is quoted, which is common when using variables in the
config file, those quotes must be ignored here, or the input device will be
ignored.
Fixes#7029.
The "dpms" command refers to VESA Display Power Management
Signaling, a deprecated standard. It's superseded by VESA DPM.
Instead of tying out command name to a particular standard, use the
neutral term "power".
When swaynag_parse_options encounters '--dismiss-button' (or its
shorthand '-s'), it sets the text of the first button in the
swaynag.buttons list, which is expected to exist and to be the dismiss
button, to the one passed by the user.
Commit 4780afb68b ("swaynag: statically
allocate button_close, and move declaration") moved the list
initialization to after swaynag_parse_options is called which made that
code fail.
For example, the command 'swaynag --dismiss-button Dismiss' crashes and
'swaynag --message Message --button Yes "" --dismiss-button Dismiss'
shows the wrong buttons.
Move it back to before swaynag_parse_options is called.
This ensures that those surprised by the deprecation of SUID operation
receive an error rather than accidentally having sway run as root.
This detection will be removed in a future release.
Hindi is one of the most prominent languages of the Indian Subcontinent.
This commit adds the translation of the README into the Hindi language.
Some of the words are still written in English because there wasn't an
appropriate technical term of the word in the language.
Co-authored-by: Surendrajat <surendrajat@protonmail.com>
Try to gain SCHED_RR (round-robin) realtime scheduling privileges before
starting the server. This requires CAP_SYS_NICE on Linux systems.
We additionally register a pthread_atfork callback which resets the
scheduling class back to SCHED_OTHER (the Linux system default).
Due to CAP_SYS_NICE, setting RLIMIT_RTPRIO has no effect on the process
as documented within man 7 sched (from Linux):
Privileged (CAP_SYS_NICE) threads ignore the RLIMIT_RTPRIO limit;
as with older kernels, they can make arbitrary changes to
scheduling policy and priority. See getrlimit(2) for further
information on RLIMIT_RTPRIO
Note that this requires the sway distribution packagers to set the
CAP_SYS_NICE capability on the sway binary.
Supersedes #6992