output: implement CAGE_MULTI_OUTPUT_MODE_LAST

In this mode, only the last connected output will be used. If that one
is unplugged, the previously last connected output will be enabled. This
for example allows one to switch between two outputs, e.g. on a handheld
device such as a mobile phone.
This commit is contained in:
Jente Hidskes 2020-05-31 16:04:01 +02:00
parent 64299054db
commit 72f6c0bae3
2 changed files with 19 additions and 6 deletions

View file

@ -33,7 +33,9 @@ struct cg_server {
enum cg_multi_output_mode output_mode;
struct wlr_output_layout *output_layout;
struct wl_list outputs;
/* Includes disabled outputs; depending on the output_mode
* some outputs may be disabled. */
struct wl_list outputs; // cg_output::link
struct wl_listener new_output;
struct wl_listener xdg_toplevel_decoration;