diff options
author | Phil Jones <philj56@gmail.com> | 2022-06-26 22:45:55 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-06-26 22:45:55 +0100 |
commit | 5798c22da8ab204de46054871541e4363b6319e3 (patch) | |
tree | 03f750585a27b4b2c3e1887a977c5829a1691d64 /src/tofi.h | |
parent | c8fdae6e43569b32def2f5faa6cdd1d6973d12dd (diff) |
Fix multiple output handling.
The --output option can be passed to select a specific output to appear
on. Which output is chosen otherwise is currently random, as I don't
know yet how to determine which one the user's currently on.
Diffstat (limited to 'src/tofi.h')
-rw-r--r-- | src/tofi.h | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,5 +1,5 @@ -#ifndef CLIENT_H -#define CLIENT_H +#ifndef TOFI_H +#define TOFI_H #include <stdbool.h> #include <stdint.h> @@ -9,15 +9,26 @@ #include "surface.h" #include "wlr-layer-shell-unstable-v1.h" +#define MAX_OUTPUT_NAME_LEN 256 + +struct output_list_element { + struct wl_list link; + struct wl_output *wl_output; + char *name; + uint32_t width; + uint32_t height; + int32_t scale; +}; + struct tofi { /* Wayland globals */ struct wl_display *wl_display; struct wl_registry *wl_registry; struct wl_compositor *wl_compositor; struct wl_seat *wl_seat; - struct wl_output *wl_output; struct wl_shm *wl_shm; struct zwlr_layer_shell_v1 *zwlr_layer_shell; + struct wl_list output_list; /* Wayland objects */ struct wl_keyboard *wl_keyboard; @@ -52,6 +63,7 @@ struct tofi { bool hide_cursor; bool use_history; bool late_keyboard_init; + char target_output_name[MAX_OUTPUT_NAME_LEN]; }; -#endif /* CLIENT_H */ +#endif /* TOFI_H */ |