aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-06-26 15:53:30 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-06-27 16:26:30 +0000
commitbfe8138210f9c32bac2174cf4bb2c78a9a01db86 (patch)
tree97d3f577d65c61708ec8e7f36dbdbda64dfa577a /backend/x11
parentc0fd37c4914f779c270ad44d2678ef399ec8c31c (diff)
backend/x11: unmap when output is disabled
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/output.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index d1426b6f..a3a48fb0 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -26,6 +26,7 @@
static const uint32_t SUPPORTED_OUTPUT_STATE =
WLR_OUTPUT_STATE_BACKEND_OPTIONAL |
WLR_OUTPUT_STATE_BUFFER |
+ WLR_OUTPUT_STATE_ENABLED |
WLR_OUTPUT_STATE_MODE |
WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED;
@@ -350,6 +351,14 @@ static bool output_commit(struct wlr_output *wlr_output,
return false;
}
+ if (state->committed & WLR_OUTPUT_STATE_ENABLED) {
+ if (state->enabled) {
+ xcb_map_window(x11->xcb, output->win);
+ } else {
+ xcb_unmap_window(x11->xcb, output->win);
+ }
+ }
+
if (state->committed & WLR_OUTPUT_STATE_MODE) {
if (!output_set_custom_mode(wlr_output,
state->custom_mode.width,