The output is disabled then re-enabled using the wlr-output-management
protocol with tool such as wlr-randr.
$ wlr-randr --output HDMI-A-1 --off
$ wlr-randr --output HDMI-A-1 --on
When re-enabled the new output configuration is committed before the
output to be added to the global output layout. However,
handle_output_commit() expects the output to be already part of this
global layout and assert failed. Now, do not treat this in
handle_output_commit() and simply ensure the resulting scene output is
not NULL in handle_output_frame().
Otherwise, testing to set preferred / "best" mode will always return an
error. Consequently, output will simply be configured with last and
probably "worst" mode.
Only terminate if the last output was nested under the Wayland or X11
backend. If not, using DRM backend for example, terminating Cage when
unplugging the last monitor or simply turning it off does not seem to be
the right behavior.
wl_touch::frame() is expected to be sent to client to indicate end of
touch frame event and not sending it may cause issues.
For example, Qt applications using Qt Wayland platform plugin do not
consider touch events until this end of frame to be received.
Some applications indicate different shutdown conditions by returning
specific exit codes. One of these is e.g. Kodi, which returns 64 in case
the user chose "Power off" and 66 in case the user chose "Reboot".
In order to act on these exit codes, it thus makes sense in some
situations to pass them on from the primary client to the caller of
Cage.
This exit code is only returned if the primary client is the cause of
Cage terminating.
Co-authored-by: Patrick Steinhardt <ps@pks.im>
Previously, the output of `meson build` would warn about the use of
some functions that have been deprecated since meson v0.56.0, and
the use of the `check` kwarg in the `run_command()` function.
Update meson.build to fix these build warnings.