mirror of
https://github.com/wizbright/waybox.git
synced 2025-10-29 05:40:20 -04:00
Fixed new-output notifications in wlroots 0.6.0-0.8.1 with DRM backend
This commit is contained in:
parent
9b94ae7a01
commit
13826a5116
3 changed files with 6 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
project(
|
project(
|
||||||
'waybox',
|
'waybox',
|
||||||
'c',
|
'c',
|
||||||
version: '0.0.2',
|
version: '0.0.2.1',
|
||||||
license: 'MIT',
|
license: 'MIT',
|
||||||
meson_version: '>=0.43.0',
|
meson_version: '>=0.43.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <wlr/version.h>
|
||||||
|
|
||||||
#include "waybox/output.h"
|
#include "waybox/output.h"
|
||||||
|
|
||||||
struct render_data {
|
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_set_mode(wlr_output, mode);
|
||||||
wlr_output_enable(wlr_output, true);
|
wlr_output_enable(wlr_output, true);
|
||||||
|
|
||||||
|
#if WLR_VERSION_NUM > 2049
|
||||||
|
// wlroots 0.9.0+
|
||||||
if (!wlr_output_commit(wlr_output)) {
|
if (!wlr_output_commit(wlr_output)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wb_output *output = calloc(1, sizeof(struct wb_output));
|
struct wb_output *output = calloc(1, sizeof(struct wb_output));
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
#include "waybox/xdg_shell.h"
|
#include "waybox/xdg_shell.h"
|
||||||
|
|
||||||
bool init_wb(struct wb_server* server) {
|
bool init_wb(struct wb_server* server) {
|
||||||
|
|
||||||
// create display
|
// create display
|
||||||
server->wl_display = wl_display_create();
|
server->wl_display = wl_display_create();
|
||||||
if (server->wl_display == NULL) {
|
if (server->wl_display == NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue