diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-19 10:17:04 -0500 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-19 10:44:51 -0500 |
commit | ee210758fca4182e1ba3a37051fb3d7eec099da4 (patch) | |
tree | 921384fbde5c3b8769a62fabce8ff139c9ccf0f0 | |
parent | c0fd60be633945fd7381a5b995572e4f2350a31e (diff) |
tinywl: init output render before commit
-rw-r--r-- | tinywl/tinywl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c index 82f0977a..ab5ed7ce 100644 --- a/tinywl/tinywl.c +++ b/tinywl/tinywl.c @@ -664,6 +664,10 @@ static void server_new_output(struct wl_listener *listener, void *data) { wl_container_of(listener, server, new_output); struct wlr_output *wlr_output = data; + /* Configures the output created by the backend to use our allocator + * and our renderer. Must be done once, before commiting the output */ + wlr_output_init_render(wlr_output, server->allocator, server->renderer); + /* Some backends don't have modes. DRM+KMS does, and we need to set a mode * before we can use the output. The mode is a tuple of (width, height, * refresh rate), and each monitor supports only a specific set of modes. We @@ -678,10 +682,6 @@ static void server_new_output(struct wl_listener *listener, void *data) { } } - /* Configures the output created by the backend to use our allocator - * and our renderer */ - wlr_output_init_render(wlr_output, server->allocator, server->renderer); - /* Allocates and configures our state for this output */ struct tinywl_output *output = calloc(1, sizeof(struct tinywl_output)); |