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.
This commit is contained in:
Jente Hidskes 2020-05-31 15:45:47 +02:00
parent f4b63cd6b8
commit 64299054db
2 changed files with 8 additions and 0 deletions

2
cage.c
View file

@ -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

View file

@ -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;