aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/output.c10
-rw-r--r--backend/x11/backend.c4
2 files changed, 4 insertions, 10 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 3194e2cf..0dde343c 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -210,9 +210,7 @@ static void xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *x
}
// loop over states for maximized etc?
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
- output->wlr_output.width = width;
- output->wlr_output.height = height;
- wlr_output_update_matrix(&output->wlr_output);
+ wlr_output_update_size(&output->wlr_output, width, height);
wl_signal_emit(&output->wlr_output.events.resolution, output);
}
@@ -244,13 +242,11 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
wlr_output_init(&output->wlr_output, &backend->backend, &output_impl);
struct wlr_output *wlr_output = &output->wlr_output;
- wlr_output->width = 640;
- wlr_output->height = 480;
+ wlr_output_update_size(wlr_output, 640, 480);
strncpy(wlr_output->make, "wayland", sizeof(wlr_output->make));
strncpy(wlr_output->model, "wayland", sizeof(wlr_output->model));
snprintf(wlr_output->name, sizeof(wlr_output->name), "WL-%d",
- wl_list_length(&backend->outputs) + 1);
- wlr_output_update_matrix(wlr_output);
+ wl_list_length(&backend->outputs) + 1);
output->backend = backend;
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index d30ec376..0e98b8d9 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -121,9 +121,7 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
case XCB_CONFIGURE_NOTIFY: {
xcb_configure_notify_event_t *ev = (xcb_configure_notify_event_t *)event;
- output->wlr_output.width = ev->width;
- output->wlr_output.height = ev->height;
- wlr_output_update_matrix(&output->wlr_output);
+ wlr_output_update_size(&output->wlr_output, ev->width, ev->height);
wl_signal_emit(&output->wlr_output.events.resolution, output);
// Move the pointer to its new location