mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-25 13:14:13 -04:00
fix: headless output must config before add to output layout
This commit is contained in:
parent
15032151c8
commit
9e5a5f3a42
1 changed files with 10 additions and 1 deletions
11
src/mango.c
11
src/mango.c
|
|
@ -3529,6 +3529,11 @@ void createmon(struct wl_listener *listener, void *data) {
|
|||
output_state_setup_hdr(m, false, &m->pending);
|
||||
}
|
||||
|
||||
// 虚拟显示器在加入显示器链前必须先配置,否则会崩溃
|
||||
if (wlr_output_is_headless(m->wlr_output)) {
|
||||
mango_output_commit(m);
|
||||
}
|
||||
|
||||
wl_list_insert(&mons, &m->link);
|
||||
|
||||
m->pertag = calloc(1, sizeof(Pertag));
|
||||
|
|
@ -3576,7 +3581,11 @@ void createmon(struct wl_listener *listener, void *data) {
|
|||
else
|
||||
wlr_output_layout_add(output_layout, wlr_output, m->m.x, m->m.y);
|
||||
|
||||
mango_scene_output_commit(m->scene_output, &m->pending);
|
||||
// 无头显示器不不要支持hdr
|
||||
if (!wlr_output_is_headless(m->wlr_output)) {
|
||||
mango_scene_output_commit(m->scene_output, &m->pending);
|
||||
}
|
||||
|
||||
wlr_output_effective_resolution(m->wlr_output, &m->m.width, &m->m.height);
|
||||
|
||||
if (config.blur) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue