mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-01 13:14:23 -04:00
fix: headless output must config before add to output layout
This commit is contained in:
parent
9e10b9af52
commit
83a33e01a3
1 changed files with 10 additions and 1 deletions
11
src/mango.c
11
src/mango.c
|
|
@ -3448,6 +3448,11 @@ void createmon(struct wl_listener *listener, void *data) {
|
||||||
output_state_setup_hdr(m, false, &m->pending);
|
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);
|
wl_list_insert(&mons, &m->link);
|
||||||
|
|
||||||
m->pertag = calloc(1, sizeof(Pertag));
|
m->pertag = calloc(1, sizeof(Pertag));
|
||||||
|
|
@ -3495,7 +3500,11 @@ void createmon(struct wl_listener *listener, void *data) {
|
||||||
else
|
else
|
||||||
wlr_output_layout_add(output_layout, wlr_output, m->m.x, m->m.y);
|
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);
|
wlr_output_effective_resolution(m->wlr_output, &m->m.width, &m->m.height);
|
||||||
|
|
||||||
m->ext_group = wlr_ext_workspace_group_handle_v1_create(
|
m->ext_group = wlr_ext_workspace_group_handle_v1_create(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue