aboutsummaryrefslogtreecommitdiff
path: root/include/backend
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-03-15 11:50:28 -0400
committeremersion <contact@emersion.fr>2019-03-15 18:37:56 +0200
commitc97f0eb0f2b9f349b573d83f67b0a20f00c2f9c8 (patch)
tree2e4be1804f234010032074baec8365578542f13e /include/backend
parentb135599e5a36acd5a49edfcab052bab729ea3b43 (diff)
backend/headless: improve output number handling
This improves the way the output numbers are handled for the headless backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be HEADLESS-2, which causes an issue since the identifier will also be identical. With this, the last output is HEADLESS-3 and the outputs can be distinguished.
Diffstat (limited to 'include/backend')
-rw-r--r--include/backend/headless.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/backend/headless.h b/include/backend/headless.h
index 35280862..66448071 100644
--- a/include/backend/headless.h
+++ b/include/backend/headless.h
@@ -12,6 +12,7 @@ struct wlr_headless_backend {
struct wlr_renderer *renderer;
struct wl_display *display;
struct wl_list outputs;
+ size_t last_output_num;
struct wl_list input_devices;
struct wl_listener display_destroy;
bool started;