wayland: Use wl_output_release with wl_output v3

wl_output_release, the use of which was recently introduced, is not
available until wl_output interface version 3.

However, only wl_output version 2 was bound. This lead to protocol
errors when a display was disconnected, causing foot to terminate.

Instead, only use wl_output_release if wl_output version 3 is provided
and bound. Otherwise, just use wl_output_destroy.

Closes: https://codeberg.org/dnkl/foot/issues/219
This commit is contained in:
Kenny Levinsen 2020-11-24 00:00:43 +01:00
parent 90edc09697
commit ab6327da26
2 changed files with 11 additions and 4 deletions

View file

@ -294,6 +294,8 @@ struct monitor {
char *description;
float inch; /* e.g. 24" */
bool use_output_release;
};
struct wayland;