mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-01 13:14:23 -04:00
opt: optimize dmps state
This commit is contained in:
parent
3066610418
commit
6b83d4d7e9
1 changed files with 6 additions and 1 deletions
|
|
@ -6852,14 +6852,19 @@ void updatemons(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
/* First remove from the layout the disabled monitors */
|
/* First remove from the layout the disabled monitors */
|
||||||
wl_list_for_each(m, &mons, link) {
|
wl_list_for_each(m, &mons, link) {
|
||||||
if (m->wlr_output->enabled || m->only_dpms_off)
|
if (m->wlr_output->enabled)
|
||||||
continue;
|
continue;
|
||||||
config_head = wlr_output_configuration_head_v1_create(output_config,
|
config_head = wlr_output_configuration_head_v1_create(output_config,
|
||||||
m->wlr_output);
|
m->wlr_output);
|
||||||
config_head->state.enabled = 0;
|
config_head->state.enabled = 0;
|
||||||
|
|
||||||
|
if (m->only_dpms_off) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/* Remove this output from the layout to avoid cursor enter inside
|
/* Remove this output from the layout to avoid cursor enter inside
|
||||||
* it */
|
* it */
|
||||||
wlr_output_layout_remove(output_layout, m->wlr_output);
|
wlr_output_layout_remove(output_layout, m->wlr_output);
|
||||||
|
|
||||||
closemon(m);
|
closemon(m);
|
||||||
m->m = m->w = (struct wlr_box){0};
|
m->m = m->w = (struct wlr_box){0};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue