Start working on a man page
This commit adds an initial man page for wlr-randr. The text of this
man page is based on the one provided by Debian [1] with some minor
modifications here and there. The meson.build snippets for building
and installing the man page have been taken from wlsunset, again with
some minor modifications.
The man page is far from perfect but I think it's a good starting point.
We can further refine and improve the man page in the future. This also
provides us with a central place to document wlr-randr's behavior in
greater detail, e.g. discuss discrepancies between xrandr and wlr-randr
regarding relative output positioning.
[1]: https://manpages.debian.org/testing/wlr-randr/wlr-randr.1.en.html
Implement relative positioning options from xrandr
This implements the --above, --below, --right-of, and --left-of
positioning options from xrandr(1). The code is heavily inspired
by xrandr's implementation [1]. The --same-as option has not been
implemented but can easily be added as well, if deemed useful.
Absolute positioning via --pos overwrites a previously established
relative position and vice versa. The last positioning option passed
on the command-line takes precedence.
Contrary to xrandr, this implementation does currently not detect
loops in relative specifications. This could be implemented in future
work.
[1]: https://gitlab.freedesktop.org/xorg/app/xrandr/-/blob/xrandr-1.5.2/xrandr.c?ref_type=tags#L2004-L2024
Hide make/model/serial line if unset
build: bump version to 0.4.1
Turn adaptive sync version check into assert in apply_state()
parse_output_arg() has the same check and gracefully prints an
error message.
Fix zwlr_output_configuration_head_v1 leak
Don't send unset props
This fixes e.g. re-enabling outputs of wlroots' nested backends, and
helps to avoid pinning automatically positioned outputs.
build: bump version to 0.4.0
build: drop unnecessary intermediate protocols library
build: require wayland-scanner >= 1.14.91
build: find wayland-scanner via pkg-config
Add --json option
This option enables state output in json format.
Check for wl_display_roundtrip errors
And remove unnecessary wl_display_dispatch call.
Destroy head and mode objects before disconnect
The latest version of libwayland now prints warnings if we don't destroy
these.
warning: queue 0x56103a63e390 destroyed while proxies still attached:
zwlr_output_mode_v1@4278190123 still attached
zwlr_output_mode_v1@4278190122 still attached
...
Co-authored-by: Simon Ser <contact@emersion.fr>
build: bump version to 0.3.0
Retain head/mode ordering
This is especially important for the modes: we want to pick the
first mode which matches what the user requested.