summaryrefslogtreecommitdiffstats
path: root/wayland/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'wayland/registry.c')
-rw-r--r--wayland/registry.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wayland/registry.c b/wayland/registry.c
index 622571f0..2d66b7eb 100644
--- a/wayland/registry.c
+++ b/wayland/registry.c
@@ -32,7 +32,8 @@ static void display_handle_done(void *data, struct wl_output *wl_output) {
32} 32}
33 33
34static void display_handle_scale(void *data, struct wl_output *wl_output, int32_t factor) { 34static void display_handle_scale(void *data, struct wl_output *wl_output, int32_t factor) {
35 // this space intentionally left blank 35 struct output_state *state = data;
36 state->scale = factor;
36} 37}
37 38
38static const struct wl_output_listener output_listener = { 39static const struct wl_output_listener output_listener = {
@@ -220,6 +221,7 @@ static void registry_global(void *data, struct wl_registry *registry,
220 struct wl_output *output = wl_registry_bind(registry, name, &wl_output_interface, version); 221 struct wl_output *output = wl_registry_bind(registry, name, &wl_output_interface, version);
221 struct output_state *ostate = malloc(sizeof(struct output_state)); 222 struct output_state *ostate = malloc(sizeof(struct output_state));
222 ostate->output = output; 223 ostate->output = output;
224 ostate->scale = 1;
223 wl_output_add_listener(output, &output_listener, ostate); 225 wl_output_add_listener(output, &output_listener, ostate);
224 list_add(reg->outputs, ostate); 226 list_add(reg->outputs, ostate);
225 } else if (strcmp(interface, desktop_shell_interface.name) == 0) { 227 } else if (strcmp(interface, desktop_shell_interface.name) == 0) {