aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/layer-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/layer-shell.c b/examples/layer-shell.c
index 91c509f6..f006a1b7 100644
--- a/examples/layer-shell.c
+++ b/examples/layer-shell.c
@@ -94,7 +94,7 @@ static void handle_global(void *data, struct wl_registry *registry,
compositor = wl_registry_bind(registry, name,
&wl_compositor_interface, 1);
} else if (strcmp(interface, "wl_output") == 0) {
- if (output == 0) {
+ if (output == 0 && !wl_output) {
wl_output = wl_registry_bind(registry, name,
&wl_output_interface, 1);
} else {