aboutsummaryrefslogtreecommitdiff
path: root/include/backend
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-03-15 11:40:31 -0400
committeremersion <contact@emersion.fr>2019-03-15 18:37:35 +0200
commitb135599e5a36acd5a49edfcab052bab729ea3b43 (patch)
tree6b8da4548319ccfe708a98bfafb3a98e91bd0ec1 /include/backend
parent67523fb22889a6025890b4acd497a973c1d2591b (diff)
backend/x11: improve output number handling
This improves the way the output numbers are handled for the x11 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 X11-2, which causes an issue since the identifier will also be identical. With this, the last output is X11-3 and the outputs can be distinguished.
Diffstat (limited to 'include/backend')
-rw-r--r--include/backend/x11.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 1a8341f6..67511602 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -47,6 +47,7 @@ struct wlr_x11_backend {
xcb_screen_t *screen;
size_t requested_outputs;
+ size_t last_output_num;
struct wl_list outputs; // wlr_x11_output::link
struct wlr_keyboard keyboard;