From ff39cac355e79b21049ba0ad181c098aebefc313 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Tue, 28 Nov 2023 20:44:30 -0600 Subject: convert issue templates to yaml also move the templates to .gitea to reflect the migration to Codeberg --- .gitea/issue_template/bug_report.yml | 27 +++++++++++++++++++++++++++ .gitea/issue_template/enhancement-idea.yml | 9 +++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 17 ----------------- .github/ISSUE_TEMPLATE/enhancement-idea.md | 10 ---------- 4 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 .gitea/issue_template/bug_report.yml create mode 100644 .gitea/issue_template/enhancement-idea.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/enhancement-idea.md diff --git a/.gitea/issue_template/bug_report.yml b/.gitea/issue_template/bug_report.yml new file mode 100644 index 0000000..1ec1cf0 --- /dev/null +++ b/.gitea/issue_template/bug_report.yml @@ -0,0 +1,27 @@ +name: Bug Report +about: Something in dwl isn't working correctly +title: +labels: + - 'Kind/Bug' +body: + - type: markdown + attributes: + value: | + Only report bugs that can be reproduced on the main (or wlroots-next) branch + Report patch issues to their respective authors + - type: input + id: dwl_version + attributes: + label: dwl version + placeholder: '`dwl -v`' + validations: + required: true + - type: input + id: wlroots_version + attributes: + label: wlroots version + validations: + required: true + - type: textarea + attributes: + label: Description diff --git a/.gitea/issue_template/enhancement-idea.yml b/.gitea/issue_template/enhancement-idea.yml new file mode 100644 index 0000000..be1bbf2 --- /dev/null +++ b/.gitea/issue_template/enhancement-idea.yml @@ -0,0 +1,9 @@ +name: Enhancement idea +about: Suggest a feature or improvement +title: +labels: + - 'Kind/Feature' +body: + - type: textarea + attributes: + label: Description diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index cd9bd8d..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Bug report -about: Something in dwl isn't working correctly -title: '' -labels: 'A: bug' -assignees: '' - ---- - -## Info -dwl version: -wlroots version: -## Description - diff --git a/.github/ISSUE_TEMPLATE/enhancement-idea.md b/.github/ISSUE_TEMPLATE/enhancement-idea.md deleted file mode 100644 index 0ac096d..0000000 --- a/.github/ISSUE_TEMPLATE/enhancement-idea.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Enhancement idea -about: Suggest a feature or improvement -title: '' -labels: 'A: enhancement' -assignees: '' - ---- - - -- cgit v1.2.3 From 43f31b8f1be327bf4d29e1efc2ea51178ac64481 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Tue, 28 Nov 2023 22:50:40 -0600 Subject: improve the bug report template Fixes: https://codeberg.org/dwl/dwl/issues/498 --- .gitea/issue_template/bug_report.yml | 43 ++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.gitea/issue_template/bug_report.yml b/.gitea/issue_template/bug_report.yml index 1ec1cf0..56f4a3e 100644 --- a/.gitea/issue_template/bug_report.yml +++ b/.gitea/issue_template/bug_report.yml @@ -7,21 +7,56 @@ body: - type: markdown attributes: value: | - Only report bugs that can be reproduced on the main (or wlroots-next) branch - Report patch issues to their respective authors + - Only report bugs that can be reproduced on the main (or wlroots-next) branch without patches. + - Proprietary graphics drivers, including nvidia, are not supported. Please use the open source equivalents, such as nouveau, if you would like to use dwl. + - Report patch issues to their respective authors. + - type: input id: dwl_version attributes: - label: dwl version + label: 'dwl version:' placeholder: '`dwl -v`' validations: required: true + - type: input id: wlroots_version attributes: - label: wlroots version + label: 'wlroots version:' validations: required: true + + - type: input + id: distro + attributes: + label: What distro (and version) are you using? + validations: + required: false + + - type: textarea + id: debug_log + attributes: + label: Debug Log + value: | + Run `dwl -d 2> ~/dwl.log` from a TTY and attach the **full** (do not truncate it) file here, or upload it to a pastebin. + Please try to keep the reproduction as brief as possible and exit dwl. + validations: + required: false + + - type: textarea + id: backtrace + attributes: + label: Stack Trace + value: | + - Only required if dwl crashes. + - If the lines mentioning dwl or wlroots have `??`. Please compile both dwl and wlroots from source (enabling debug symbols) and try to reproduce. + validations: + required: false + - type: textarea attributes: label: Description + value: | + The steps you took to reproduce the problem. + validations: + required: false -- cgit v1.2.3 From 2e29189b92c581345eb6b40a98e81c0e692fe8a8 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Thu, 30 Nov 2023 21:10:21 -0600 Subject: use a detached output state in outputmgrapplyortest() wlr_output.pending might be removed in wlroots 0.18 --- dwl.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/dwl.c b/dwl.c index 69da91d..0ef6bfe 100644 --- a/dwl.c +++ b/dwl.c @@ -1724,14 +1724,17 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test) wl_list_for_each(config_head, &config->heads, link) { struct wlr_output *wlr_output = config_head->state.output; Monitor *m = wlr_output->data; + struct wlr_output_state state; - wlr_output_enable(wlr_output, config_head->state.enabled); + wlr_output_state_init(&state); + wlr_output_state_set_enabled(&state, config_head->state.enabled); if (!config_head->state.enabled) goto apply_or_test; + if (config_head->state.mode) - wlr_output_set_mode(wlr_output, config_head->state.mode); + wlr_output_state_set_mode(&state, config_head->state.mode); else - wlr_output_set_custom_mode(wlr_output, + wlr_output_state_set_custom_mode(&state, config_head->state.custom_mode.width, config_head->state.custom_mode.height, config_head->state.custom_mode.refresh); @@ -1741,18 +1744,16 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test) if (m->m.x != config_head->state.x || m->m.y != config_head->state.y) wlr_output_layout_add(output_layout, wlr_output, config_head->state.x, config_head->state.y); - wlr_output_set_transform(wlr_output, config_head->state.transform); - wlr_output_set_scale(wlr_output, config_head->state.scale); - wlr_output_enable_adaptive_sync(wlr_output, + wlr_output_state_set_transform(&state, config_head->state.transform); + wlr_output_state_set_scale(&state, config_head->state.scale); + wlr_output_state_set_adaptive_sync_enabled(&state, config_head->state.adaptive_sync_enabled); apply_or_test: - if (test) { - ok &= wlr_output_test(wlr_output); - wlr_output_rollback(wlr_output); - } else { - ok &= wlr_output_commit(wlr_output); - } + ok &= test ? wlr_output_test_state(wlr_output, &state) + : wlr_output_commit_state(wlr_output, &state); + + wlr_output_state_finish(&state); } if (ok) -- cgit v1.2.3 From 00e867d5365a7d98b1094386f8a0b88839eb9d86 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Thu, 30 Nov 2023 21:12:31 -0600 Subject: use detached output state in createmon() see previous commit for motivation --- dwl.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dwl.c b/dwl.c index 0ef6bfe..6d74a3f 100644 --- a/dwl.c +++ b/dwl.c @@ -858,22 +858,25 @@ createmon(struct wl_listener *listener, void *data) struct wlr_output *wlr_output = data; const MonitorRule *r; size_t i; + struct wlr_output_state state; Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m)); m->wlr_output = wlr_output; wlr_output_init_render(wlr_output, alloc, drw); - /* Initialize monitor state using configured rules */ for (i = 0; i < LENGTH(m->layers); i++) wl_list_init(&m->layers[i]); + + wlr_output_state_init(&state); + /* Initialize monitor state using configured rules */ m->tagset[0] = m->tagset[1] = 1; for (r = monrules; r < END(monrules); r++) { if (!r->name || strstr(wlr_output->name, r->name)) { m->mfact = r->mfact; m->nmaster = r->nmaster; - wlr_output_set_scale(wlr_output, r->scale); + wlr_output_state_set_scale(&state, r->scale); m->lt[0] = m->lt[1] = r->lt; - wlr_output_set_transform(wlr_output, r->rr); + wlr_output_state_set_transform(&state, r->rr); m->m.x = r->x; m->m.y = r->y; break; @@ -884,16 +887,19 @@ createmon(struct wl_listener *listener, void *data) * monitor supports only a specific set of modes. We just pick the * monitor's preferred mode; a more sophisticated compositor would let * the user configure it. */ - wlr_output_set_mode(wlr_output, wlr_output_preferred_mode(wlr_output)); + wlr_output_state_set_mode(&state, wlr_output_preferred_mode(wlr_output)); /* Set up event listeners */ LISTEN(&wlr_output->events.frame, &m->frame, rendermon); LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon); LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate); - wlr_output_enable(wlr_output, 1); - if (!wlr_output_commit(wlr_output)) + wlr_output_state_set_enabled(&state, 1); + if (!wlr_output_commit_state(wlr_output, &state)) { + wlr_output_state_finish(&state); return; + } + wlr_output_state_finish(&state); wl_list_insert(&mons, &m->link); printstatus(); -- cgit v1.2.3 From 901d2e2d9d54ab6c6a66d0877402bab04a60093e Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Thu, 30 Nov 2023 22:17:30 -0600 Subject: check failure of wlr_output_init_render --- dwl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dwl.c b/dwl.c index 6d74a3f..1eee591 100644 --- a/dwl.c +++ b/dwl.c @@ -859,10 +859,13 @@ createmon(struct wl_listener *listener, void *data) const MonitorRule *r; size_t i; struct wlr_output_state state; - Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m)); - m->wlr_output = wlr_output; + Monitor *m; - wlr_output_init_render(wlr_output, alloc, drw); + if (!wlr_output_init_render(wlr_output, alloc, drw)) + return; + + m = wlr_output->data = ecalloc(1, sizeof(*m)); + m->wlr_output = wlr_output; for (i = 0; i < LENGTH(m->layers); i++) wl_list_init(&m->layers[i]); -- cgit v1.2.3 From 5f7d396996ce67bce4f2a35c936e9879576b5aa1 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Thu, 30 Nov 2023 22:22:21 -0600 Subject: don't return early if the first output commit fails --- dwl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dwl.c b/dwl.c index 1eee591..1bfe8cf 100644 --- a/dwl.c +++ b/dwl.c @@ -898,10 +898,7 @@ createmon(struct wl_listener *listener, void *data) LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate); wlr_output_state_set_enabled(&state, 1); - if (!wlr_output_commit_state(wlr_output, &state)) { - wlr_output_state_finish(&state); - return; - } + wlr_output_commit_state(wlr_output, &state); wlr_output_state_finish(&state); wl_list_insert(&mons, &m->link); -- cgit v1.2.3