From 13826a5116a12e450f74356cc211e63fe79beff5 Mon Sep 17 00:00:00 2001 From: Keith Bowes Date: Wed, 26 Feb 2020 08:26:23 -0500 Subject: [PATCH] Fixed new-output notifications in wlroots 0.6.0-0.8.1 with DRM backend --- meson.build | 2 +- waybox/output.c | 5 +++++ waybox/server.c | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c11b68e..0504de3 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( 'waybox', 'c', - version: '0.0.2', + version: '0.0.2.1', license: 'MIT', meson_version: '>=0.43.0', default_options: [ diff --git a/waybox/output.c b/waybox/output.c index 2eed274..3cad3e6 100644 --- a/waybox/output.c +++ b/waybox/output.c @@ -1,3 +1,5 @@ +#include + #include "waybox/output.h" struct render_data { @@ -126,9 +128,12 @@ void new_output_notify(struct wl_listener *listener, void *data) { wlr_output_set_mode(wlr_output, mode); wlr_output_enable(wlr_output, true); +#if WLR_VERSION_NUM > 2049 + // wlroots 0.9.0+ if (!wlr_output_commit(wlr_output)) { return; } +#endif } struct wb_output *output = calloc(1, sizeof(struct wb_output)); diff --git a/waybox/server.c b/waybox/server.c index 21687a0..1fe2109 100644 --- a/waybox/server.c +++ b/waybox/server.c @@ -2,7 +2,6 @@ #include "waybox/xdg_shell.h" bool init_wb(struct wb_server* server) { - // create display server->wl_display = wl_display_create(); if (server->wl_display == NULL) {