mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
Merge remote-tracking branch 'upstream/main' into wlroots-next
This commit is contained in:
commit
bab5c0185a
5 changed files with 100 additions and 49 deletions
62
.gitea/issue_template/bug_report.yml
Normal file
62
.gitea/issue_template/bug_report.yml
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
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 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:'
|
||||||
|
placeholder: '`dwl -v`'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: wlroots_version
|
||||||
|
attributes:
|
||||||
|
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
|
9
.gitea/issue_template/enhancement-idea.yml
Normal file
9
.gitea/issue_template/enhancement-idea.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
name: Enhancement idea
|
||||||
|
about: Suggest a feature or improvement
|
||||||
|
title:
|
||||||
|
labels:
|
||||||
|
- 'Kind/Feature'
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -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
|
|
||||||
<!--
|
|
||||||
Only report bugs that can be reproduced on the main line
|
|
||||||
Report patch issues to their respective authors
|
|
||||||
-->
|
|
10
.github/ISSUE_TEMPLATE/enhancement-idea.md
vendored
10
.github/ISSUE_TEMPLATE/enhancement-idea.md
vendored
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
name: Enhancement idea
|
|
||||||
about: Suggest a feature or improvement
|
|
||||||
title: ''
|
|
||||||
labels: 'A: enhancement'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
51
dwl.c
51
dwl.c
|
@ -861,22 +861,28 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
struct wlr_output *wlr_output = data;
|
struct wlr_output *wlr_output = data;
|
||||||
const MonitorRule *r;
|
const MonitorRule *r;
|
||||||
size_t i;
|
size_t i;
|
||||||
Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m));
|
struct wlr_output_state state;
|
||||||
|
Monitor *m;
|
||||||
|
|
||||||
|
if (!wlr_output_init_render(wlr_output, alloc, drw))
|
||||||
|
return;
|
||||||
|
|
||||||
|
m = wlr_output->data = ecalloc(1, sizeof(*m));
|
||||||
m->wlr_output = wlr_output;
|
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++)
|
for (i = 0; i < LENGTH(m->layers); i++)
|
||||||
wl_list_init(&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;
|
m->tagset[0] = m->tagset[1] = 1;
|
||||||
for (r = monrules; r < END(monrules); r++) {
|
for (r = monrules; r < END(monrules); r++) {
|
||||||
if (!r->name || strstr(wlr_output->name, r->name)) {
|
if (!r->name || strstr(wlr_output->name, r->name)) {
|
||||||
m->mfact = r->mfact;
|
m->mfact = r->mfact;
|
||||||
m->nmaster = r->nmaster;
|
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;
|
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.x = r->x;
|
||||||
m->m.y = r->y;
|
m->m.y = r->y;
|
||||||
break;
|
break;
|
||||||
|
@ -887,16 +893,16 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
* monitor supports only a specific set of modes. We just pick the
|
* monitor supports only a specific set of modes. We just pick the
|
||||||
* monitor's preferred mode; a more sophisticated compositor would let
|
* monitor's preferred mode; a more sophisticated compositor would let
|
||||||
* the user configure it. */
|
* 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 */
|
/* Set up event listeners */
|
||||||
LISTEN(&wlr_output->events.frame, &m->frame, rendermon);
|
LISTEN(&wlr_output->events.frame, &m->frame, rendermon);
|
||||||
LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);
|
LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);
|
||||||
LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate);
|
LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate);
|
||||||
|
|
||||||
wlr_output_enable(wlr_output, 1);
|
wlr_output_state_set_enabled(&state, 1);
|
||||||
if (!wlr_output_commit(wlr_output))
|
wlr_output_commit_state(wlr_output, &state);
|
||||||
return;
|
wlr_output_state_finish(&state);
|
||||||
|
|
||||||
wl_list_insert(&mons, &m->link);
|
wl_list_insert(&mons, &m->link);
|
||||||
printstatus();
|
printstatus();
|
||||||
|
@ -1723,14 +1729,17 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
|
||||||
wl_list_for_each(config_head, &config->heads, link) {
|
wl_list_for_each(config_head, &config->heads, link) {
|
||||||
struct wlr_output *wlr_output = config_head->state.output;
|
struct wlr_output *wlr_output = config_head->state.output;
|
||||||
Monitor *m = wlr_output->data;
|
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)
|
if (!config_head->state.enabled)
|
||||||
goto apply_or_test;
|
goto apply_or_test;
|
||||||
|
|
||||||
if (config_head->state.mode)
|
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
|
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.width,
|
||||||
config_head->state.custom_mode.height,
|
config_head->state.custom_mode.height,
|
||||||
config_head->state.custom_mode.refresh);
|
config_head->state.custom_mode.refresh);
|
||||||
|
@ -1740,18 +1749,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)
|
if (m->m.x != config_head->state.x || m->m.y != config_head->state.y)
|
||||||
wlr_output_layout_add(output_layout, wlr_output,
|
wlr_output_layout_add(output_layout, wlr_output,
|
||||||
config_head->state.x, config_head->state.y);
|
config_head->state.x, config_head->state.y);
|
||||||
wlr_output_set_transform(wlr_output, config_head->state.transform);
|
wlr_output_state_set_transform(&state, config_head->state.transform);
|
||||||
wlr_output_set_scale(wlr_output, config_head->state.scale);
|
wlr_output_state_set_scale(&state, config_head->state.scale);
|
||||||
wlr_output_enable_adaptive_sync(wlr_output,
|
wlr_output_state_set_adaptive_sync_enabled(&state,
|
||||||
config_head->state.adaptive_sync_enabled);
|
config_head->state.adaptive_sync_enabled);
|
||||||
|
|
||||||
apply_or_test:
|
apply_or_test:
|
||||||
if (test) {
|
ok &= test ? wlr_output_test_state(wlr_output, &state)
|
||||||
ok &= wlr_output_test(wlr_output);
|
: wlr_output_commit_state(wlr_output, &state);
|
||||||
wlr_output_rollback(wlr_output);
|
|
||||||
} else {
|
wlr_output_state_finish(&state);
|
||||||
ok &= wlr_output_commit(wlr_output);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
|
|
Loading…
Reference in a new issue