From c09dec7cc7c568b8a045adfaac23c3299e52a632 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sun, 31 May 2020 15:45:47 +0200 Subject: [PATCH] output: add output_mode enum This enum provides two means of behaviour for multi-output setups: extend the display across all outputs, or only use the last one. The former is the current (and default) behaviour; the latter will be added in the next commit. --- cage.c | 2 ++ server.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/cage.c b/cage.c index e4eb90f..541c1c2 100644 --- a/cage.c +++ b/cage.c @@ -270,6 +270,8 @@ main(int argc, char *argv[]) return 1; } + server.output_mode = CAGE_MULTI_OUTPUT_MODE_EXTEND; + #ifdef DEBUG wlr_log_init(WLR_DEBUG, NULL); #else diff --git a/server.h b/server.h index 5caa0c1..401dd55 100644 --- a/server.h +++ b/server.h @@ -16,6 +16,11 @@ #include "seat.h" #include "view.h" +enum cg_multi_output_mode { + CAGE_MULTI_OUTPUT_MODE_EXTEND, + CAGE_MULTI_OUTPUT_MODE_LAST, +}; + struct cg_server { struct wl_display *wl_display; struct wl_list views; @@ -26,6 +31,7 @@ struct cg_server { struct wl_listener new_idle_inhibitor_v1; struct wl_list inhibitors; + enum cg_multi_output_mode output_mode; struct wlr_output_layout *output_layout; struct wl_list outputs; struct wl_listener new_output;